mirror of
https://github.com/wassname/FanFicFare.git
synced 2026-09-10 11:40:24 +08:00
Merge remote-tracking branch 'origin' into metadata
This commit is contained in:
@@ -81,10 +81,10 @@ def removeEntities(text):
|
||||
|
||||
try:
|
||||
t = text.decode('utf-8')
|
||||
except UnicodeEncodeError, e:
|
||||
except (UnicodeEncodeError,UnicodeDecodeError), e:
|
||||
try:
|
||||
t = text.encode ('ascii', 'xmlcharrefreplace')
|
||||
except UnicodeEncodeError, e:
|
||||
except (UnicodeEncodeError,UnicodeDecodeError), e:
|
||||
t = text
|
||||
text = t
|
||||
# replace numeric versions of [&<>] with named versions,
|
||||
|
||||
Reference in New Issue
Block a user