src/cm/converters/abi_converters.py
changeset 457 f62f7f0bcaa4
parent 456 b2a7c015362b
child 555 5d79dc4e50a3
--- a/src/cm/converters/abi_converters.py	Thu Aug 09 10:11:21 2012 +0200
+++ b/src/cm/converters/abi_converters.py	Thu Aug 09 11:06:46 2012 +0200
@@ -5,6 +5,7 @@
 import pexpect
 
 from abi_error import AbiConverterError, AbiCommandError
+from cm.converters.pandoc_converters import do_tidy
 
 
 TYPES_IN  = {'602': '602',       'abw': 'abw',       'aw': 'aw',     
@@ -302,8 +303,4 @@
           except KeyError:
             p['style'] = 'margin-top: 10pt; margin-bottom: 10pt;';
 
-        # 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
+        return do_tidy(unicode(soup))