Skip to content

Commit

Permalink
fix stupidity ;)
Browse files Browse the repository at this point in the history
  • Loading branch information
t0mm0 committed Oct 31, 2011
1 parent f71a2f2 commit ab16933
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions script.module.t0mm0.common/lib/t0mm0/common/addon.py
Original file line number Diff line number Diff line change
Expand Up @@ -678,17 +678,18 @@ def unescape(self, text):
Returns:
Cleaned string.
'''
text = self.decode(text)
rep = {'&lt;': '<',
'&gt;': '>',
'&quot': '"',
'&rsquo;': '\'',
'&acute;': '\'',
}
for s, r in rep.items():
text = text.replace(s, r)
# this has to be last:
text = text.replace("&amp;", "&")
try:
text = self.decode(text)
rep = {'&lt;': '<',
'&gt;': '>',
'&quot': '"',
'&rsquo;': '\'',
'&acute;': '\'',
}
for s, r in rep.items():
text = text.replace(s, r)
# this has to be last:
text = text.replace("&amp;", "&")

#we don't want to fiddle with non-string types
except TypeError:
Expand Down

0 comments on commit ab16933

Please sign in to comment.