Skip to content

Handling of "<" in html #5679

@vicb

Description

@vicb

#5657 allows "<" in text nodes so that <p>{{ a < b ? c : d }}</p> does not throw.

However this is not valid html - < would have to be &lt; to have a valid html.

One potential issue with the current approach is that in <p>{{ a <b && c > d }}</p> <b && c > would be parsed as an html tag and would not be easy for user to debug.

We could solve this by making the lexer aware of angular expression.

/cc @tbosch

edit {{ "<b>text</b>" }} could also cause pb

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: compilerIssues related to `ngc`, Angular's template compilercompiler: parsertype: bug/fix

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions