src/cm/converters/abi_converters.py
changeset 456 b2a7c015362b
parent 454 b7a092a52eae
child 457 f62f7f0bcaa4
--- a/src/cm/converters/abi_converters.py	Mon Aug 06 17:51:25 2012 +0200
+++ b/src/cm/converters/abi_converters.py	Thu Aug 09 10:11:21 2012 +0200
@@ -304,4 +304,6 @@
 
         # for some reason having DOCTYPE declaration makes soup unhappy
         output = re.sub(r'<!(<!DOCTYPE html[^>]*>)>', r'\1', unicode(soup))
+        # And for some reason, & is not converted to &amp; from time to time!
+        output = re.sub(r'&(?![A-Za-z]+[0-9]*;|#[0-9]+;|#x[0-9a-fA-F]+;)', r'&amp;', output)
         return output