From ed004e8637dd24ded882c8c555faf6c6597ea554 Mon Sep 17 00:00:00 2001 From: Jim Miller Date: Mon, 13 Feb 2012 19:39:09 -0600 Subject: [PATCH] Fix entity removal to recoginize hex correctly. --- fanficdownloader/htmlcleanup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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):