'Checks that a Mako expression in a JavaScript context does not appear in
a string that also contains HTML.
Arguments:
mako_template: The contents of the Mako template.
expression: A Mako Expression.
results: A list of results into which violations will be added.'

def _check_js_expression_not_with_html(self, mako_template, expression, results):

    parse_string = self._find_string_wrapping_expression(mako_template, expression)
    if ((parse_string is not None) and (re.search('[<>]', parse_string.string) is not None)):
        results.violations.append(ExpressionRuleViolation(Rules.mako_js_html_string, expression))
