equal
deleted
inserted
replaced
302 except KeyError: |
302 except KeyError: |
303 p['style'] = 'margin-top: 10pt; margin-bottom: 10pt;'; |
303 p['style'] = 'margin-top: 10pt; margin-bottom: 10pt;'; |
304 |
304 |
305 # for some reason having DOCTYPE declaration makes soup unhappy |
305 # for some reason having DOCTYPE declaration makes soup unhappy |
306 output = re.sub(r'<!(<!DOCTYPE html[^>]*>)>', r'\1', unicode(soup)) |
306 output = re.sub(r'<!(<!DOCTYPE html[^>]*>)>', r'\1', unicode(soup)) |
|
307 # And for some reason, & is not converted to & from time to time! |
|
308 output = re.sub(r'&(?![A-Za-z]+[0-9]*;|#[0-9]+;|#x[0-9a-fA-F]+;)', r'&', output) |
307 return output |
309 return output |