Commit 41c1c30f by Eric Fischer

Merge pull request #11917 from edx/efischer/fix_safe_linter

Safe template linter should use DOTALL
parents 08ddeca4 7cfa0fa1
...@@ -773,7 +773,7 @@ class UnderscoreTemplateLinter(object): ...@@ -773,7 +773,7 @@ class UnderscoreTemplateLinter(object):
end_index: The index of the end of the expression. end_index: The index of the end of the expression.
expression: The text of the expression. expression: The text of the expression.
""" """
unescaped_expression_regex = re.compile("<%=.*?%>", re.MULTILINE) unescaped_expression_regex = re.compile("<%=.*?%>", re.DOTALL)
expressions = [] expressions = []
for match in unescaped_expression_regex.finditer(underscore_template): for match in unescaped_expression_regex.finditer(underscore_template):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment