fix ox.image
This commit is contained in:
parent
ab9940425c
commit
a04e0ede04
3 changed files with 20 additions and 13 deletions
|
|
@ -1,11 +1,10 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# vi:si:et:sw=4:sts=4:ts=4
|
||||
# GPL 2008
|
||||
import sys
|
||||
import re
|
||||
import string
|
||||
from six.moves.html_entities import name2codepoint
|
||||
from six import unichr
|
||||
from six import unichr, PY2
|
||||
|
||||
|
||||
# Configuration for add_links() function
|
||||
|
|
@ -25,7 +24,7 @@ link_target_attribute_re = re.compile(r'(<a [^>]*?)target=[^\s>]+')
|
|||
html_gunk_re = re.compile(r'(?:<br clear="all">|<i><\/i>|<b><\/b>|<em><\/em>|<strong><\/strong>|<\/?smallcaps>|<\/?uppercase>)', re.IGNORECASE)
|
||||
hard_coded_bullets_re = re.compile(r'((?:<p>(?:%s).*?[a-zA-Z].*?</p>\s*)+)' % '|'.join([re.escape(x) for x in DOTS]), re.DOTALL)
|
||||
trailing_empty_content_re = re.compile(r'(?:<p>(?: |\s|<br \/>)*?</p>\s*)+\Z')
|
||||
if sys.version[0] == 2:
|
||||
if PY2:
|
||||
del x # Temporary variable
|
||||
|
||||
def escape(html):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue