diff --git a/fanficdownloader/htmlcleanup.py b/fanficdownloader/htmlcleanup.py
index 7e91f190..d9e2d848 100644
--- a/fanficdownloader/htmlcleanup.py
+++ b/fanficdownloader/htmlcleanup.py
@@ -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):