mirror of
https://github.com/wassname/FanFicFare.git
synced 2026-09-10 11:40:24 +08:00
Fix entity removal to recoginize hex correctly.
This commit is contained in:
@@ -27,7 +27,7 @@ def _unirepl(match):
|
||||
return unichr(value)
|
||||
|
||||
def _replaceNumberEntities(data):
|
||||
p = re.compile(r'&#(x?)(\d+);')
|
||||
p = re.compile(r'&#(x?)([0-9a-fA-F]+);')
|
||||
return p.sub(_unirepl, data)
|
||||
|
||||
def _replaceNotEntities(data):
|
||||
|
||||
Reference in New Issue
Block a user