Commit d28e0a27 by Peter Fogg

Merge pull request #11895 from edx/peter-fogg/linter-fixes

Minor fixes to the safe template linter.
parents 8459b5be 6661063b
......@@ -517,7 +517,7 @@ class MakoTemplateLinter(object):
<script.*?>| # script tag start
</script>| # script tag end
<%static:require_module.*?>| # require js script tag start
</%static:require_module> # require js script tag end""", re.VERBOSE + re.IGNORECASE)
</%static:require_module> # require js script tag end""", re.VERBOSE | re.IGNORECASE)
media_type_re = re.compile(r"""type=['"].*?['"]""", re.IGNORECASE)
contexts = [{'index': 0, 'type': 'html'}]
......@@ -773,7 +773,7 @@ class UnderscoreTemplateLinter(object):
end_index: The index of the end of the expression.
expression: The text of the expression.
"""
unescaped_expression_regex = re.compile("<%=.*?%>")
unescaped_expression_regex = re.compile("<%=.*?%>", re.MULTILINE)
expressions = []
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