Loading django/utils/html_parser.py +100 −88 Original line number Diff line number Diff line from django.utils.six.moves import html_parser as _html_parser import re import sys tagfind = re.compile('([a-zA-Z][-.a-zA-Z0-9:_]*)(?:\s|/(?!>))*') current_version = sys.version_info use_workaround = ( (current_version < (2, 6, 8)) or (current_version >= (2, 7) and current_version < (2, 7, 3)) or (current_version >= (3, 0) and current_version < (3, 2, 3)) ) HTMLParseError = _html_parser.HTMLParseError if not use_workaround: HTMLParser = _html_parser.HTMLParser else: tagfind = re.compile('([a-zA-Z][-.a-zA-Z0-9:_]*)(?:\s|/(?!>))*') class HTMLParser(_html_parser.HTMLParser): """ Patched version of stdlib's HTMLParser with patch from: Loading Loading
django/utils/html_parser.py +100 −88 Original line number Diff line number Diff line from django.utils.six.moves import html_parser as _html_parser import re import sys tagfind = re.compile('([a-zA-Z][-.a-zA-Z0-9:_]*)(?:\s|/(?!>))*') current_version = sys.version_info use_workaround = ( (current_version < (2, 6, 8)) or (current_version >= (2, 7) and current_version < (2, 7, 3)) or (current_version >= (3, 0) and current_version < (3, 2, 3)) ) HTMLParseError = _html_parser.HTMLParseError if not use_workaround: HTMLParser = _html_parser.HTMLParser else: tagfind = re.compile('([a-zA-Z][-.a-zA-Z0-9:_]*)(?:\s|/(?!>))*') class HTMLParser(_html_parser.HTMLParser): """ Patched version of stdlib's HTMLParser with patch from: Loading