diff options
author | Aymeric Augustin <aymeric.augustin@m4x.org> | 2013-09-22 14:01:57 +0200 |
---|---|---|
committer | Aymeric Augustin <aymeric.augustin@m4x.org> | 2013-09-22 14:04:10 +0200 |
commit | a5b062576bda29abe93504dbcb126e644d07f9dd (patch) | |
tree | 7a036e4ae103cd5002c0965940a8b6adc21886ca /django/utils/html_parser.py | |
parent | ee0ef1b0948c19bc5fee06a6b9b4286b879f81c1 (diff) | |
download | django-a5b062576bda29abe93504dbcb126e644d07f9dd.tar.gz |
Removed a few trailing backslashes.
We have always been at war with trailing backslashes.
Diffstat (limited to 'django/utils/html_parser.py')
-rw-r--r-- | django/utils/html_parser.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/django/utils/html_parser.py b/django/utils/html_parser.py index 6ccb665249..2a408e9f55 100644 --- a/django/utils/html_parser.py +++ b/django/utils/html_parser.py @@ -59,8 +59,8 @@ else: attrname, rest, attrvalue = m.group(1, 2, 3) if not rest: attrvalue = None - elif attrvalue[:1] == '\'' == attrvalue[-1:] or \ - attrvalue[:1] == '"' == attrvalue[-1:]: + elif (attrvalue[:1] == '\'' == attrvalue[-1:] or + attrvalue[:1] == '"' == attrvalue[-1:]): attrvalue = attrvalue[1:-1] if attrvalue: attrvalue = self.unescape(attrvalue) @@ -72,8 +72,8 @@ else: lineno, offset = self.getpos() if "\n" in self.__starttag_text: lineno = lineno + self.__starttag_text.count("\n") - offset = len(self.__starttag_text) \ - - self.__starttag_text.rfind("\n") + offset = (len(self.__starttag_text) + - self.__starttag_text.rfind("\n")) else: offset = offset + len(self.__starttag_text) self.error("junk characters in start tag: %r" |