Loading AUTHORS +2 −0 Original line number Diff line number Diff line Loading @@ -63,11 +63,13 @@ answer newbie questions, and generally made Django that much better: James Bennett Julian Bez Arvis Bickovskis <viestards.lists@gmail.com> Natalia Bidart Paul Bissex <http://e-scribe.com/> Simon Blanchard David Blewett <david@dawninglight.net> Matt Boersma <matt@sprout.org> boobsd@gmail.com Matías Bordese Andrew Brehaut <http://brehaut.net/blog> brut.alll@gmail.com btoll@bestweb.net Loading django/template/__init__.py +1 −2 Original line number Diff line number Diff line Loading @@ -480,8 +480,7 @@ filter_raw_string = r""" 'arg_sep': re.escape(FILTER_ARGUMENT_SEPARATOR), } filter_raw_string = filter_raw_string.replace("\n", "").replace(" ", "") filter_re = re.compile(filter_raw_string, re.UNICODE) filter_re = re.compile(filter_raw_string, re.UNICODE|re.VERBOSE) class FilterExpression(object): r""" Loading django/template/defaulttags.py +1 −1 Original line number Diff line number Diff line Loading @@ -1100,7 +1100,7 @@ def url(parser, token): The URL will look like ``/clients/client/123/``. """ bits = token.contents.split(' ') bits = token.split_contents() if len(bits) < 2: raise TemplateSyntaxError("'%s' takes at least one argument" " (path to a view)" % bits[0]) Loading django/utils/text.py +7 −1 Original line number Diff line number Diff line Loading @@ -197,7 +197,13 @@ def javascript_quote(s, quote_double_quotes=False): return str(ustring_re.sub(fix, s)) javascript_quote = allow_lazy(javascript_quote, unicode) smart_split_re = re.compile('("(?:[^"\\\\]*(?:\\\\.[^"\\\\]*)*)"|\'(?:[^\'\\\\]*(?:\\\\.[^\'\\\\]*)*)\'|[^\\s]+)') # Expression to match some_token and some_token="with spaces" (and similarly # for single-quoted strings). smart_split_re = re.compile(r""" ([^\s"]*"(?:[^"\\]*(?:\\.[^"\\]*)*)"\S*| [^\s']*'(?:[^'\\]*(?:\\.[^'\\]*)*)'\S*| \S+)""", re.VERBOSE) def smart_split(text): r""" Generator that splits a string by spaces, leaving quoted phrases together. Loading tests/regressiontests/templates/tests.py +1 −0 Original line number Diff line number Diff line Loading @@ -974,6 +974,7 @@ class Templates(unittest.TestCase): 'url07': (u'{% url regressiontests.templates.views.client2 tag=v %}', {'v': u'Ω'}, '/url_tag/%D0%AE%D0%BD%D0%B8%D0%BA%D0%BE%D0%B4/%CE%A9/'), 'url08': (u'{% url метка_оператора v %}', {'v': 'Ω'}, '/url_tag/%D0%AE%D0%BD%D0%B8%D0%BA%D0%BE%D0%B4/%CE%A9/'), 'url09': (u'{% url метка_оператора_2 tag=v %}', {'v': 'Ω'}, '/url_tag/%D0%AE%D0%BD%D0%B8%D0%BA%D0%BE%D0%B4/%CE%A9/'), 'url10': ('{% url regressiontests.templates.views.client_action id=client.id,action="two words" %}', {'client': {'id': 1}}, '/url_tag/client/1/two%20words/'), # Failures 'url-fail01': ('{% url %}', {}, template.TemplateSyntaxError), Loading Loading
AUTHORS +2 −0 Original line number Diff line number Diff line Loading @@ -63,11 +63,13 @@ answer newbie questions, and generally made Django that much better: James Bennett Julian Bez Arvis Bickovskis <viestards.lists@gmail.com> Natalia Bidart Paul Bissex <http://e-scribe.com/> Simon Blanchard David Blewett <david@dawninglight.net> Matt Boersma <matt@sprout.org> boobsd@gmail.com Matías Bordese Andrew Brehaut <http://brehaut.net/blog> brut.alll@gmail.com btoll@bestweb.net Loading
django/template/__init__.py +1 −2 Original line number Diff line number Diff line Loading @@ -480,8 +480,7 @@ filter_raw_string = r""" 'arg_sep': re.escape(FILTER_ARGUMENT_SEPARATOR), } filter_raw_string = filter_raw_string.replace("\n", "").replace(" ", "") filter_re = re.compile(filter_raw_string, re.UNICODE) filter_re = re.compile(filter_raw_string, re.UNICODE|re.VERBOSE) class FilterExpression(object): r""" Loading
django/template/defaulttags.py +1 −1 Original line number Diff line number Diff line Loading @@ -1100,7 +1100,7 @@ def url(parser, token): The URL will look like ``/clients/client/123/``. """ bits = token.contents.split(' ') bits = token.split_contents() if len(bits) < 2: raise TemplateSyntaxError("'%s' takes at least one argument" " (path to a view)" % bits[0]) Loading
django/utils/text.py +7 −1 Original line number Diff line number Diff line Loading @@ -197,7 +197,13 @@ def javascript_quote(s, quote_double_quotes=False): return str(ustring_re.sub(fix, s)) javascript_quote = allow_lazy(javascript_quote, unicode) smart_split_re = re.compile('("(?:[^"\\\\]*(?:\\\\.[^"\\\\]*)*)"|\'(?:[^\'\\\\]*(?:\\\\.[^\'\\\\]*)*)\'|[^\\s]+)') # Expression to match some_token and some_token="with spaces" (and similarly # for single-quoted strings). smart_split_re = re.compile(r""" ([^\s"]*"(?:[^"\\]*(?:\\.[^"\\]*)*)"\S*| [^\s']*'(?:[^'\\]*(?:\\.[^'\\]*)*)'\S*| \S+)""", re.VERBOSE) def smart_split(text): r""" Generator that splits a string by spaces, leaving quoted phrases together. Loading
tests/regressiontests/templates/tests.py +1 −0 Original line number Diff line number Diff line Loading @@ -974,6 +974,7 @@ class Templates(unittest.TestCase): 'url07': (u'{% url regressiontests.templates.views.client2 tag=v %}', {'v': u'Ω'}, '/url_tag/%D0%AE%D0%BD%D0%B8%D0%BA%D0%BE%D0%B4/%CE%A9/'), 'url08': (u'{% url метка_оператора v %}', {'v': 'Ω'}, '/url_tag/%D0%AE%D0%BD%D0%B8%D0%BA%D0%BE%D0%B4/%CE%A9/'), 'url09': (u'{% url метка_оператора_2 tag=v %}', {'v': 'Ω'}, '/url_tag/%D0%AE%D0%BD%D0%B8%D0%BA%D0%BE%D0%B4/%CE%A9/'), 'url10': ('{% url regressiontests.templates.views.client_action id=client.id,action="two words" %}', {'client': {'id': 1}}, '/url_tag/client/1/two%20words/'), # Failures 'url-fail01': ('{% url %}', {}, template.TemplateSyntaxError), Loading