Skip to content

Escaping illegal characters #15

@InteXX

Description

@InteXX

Did you figure out how to get past the problem of illegal characters in XML Literals? For example,   and — are commonly used in HTML markup, but a project won't compile if we use them in Vazor. The problem is the standalone ampersand (&).

The best workaround I could find is to use & in the literals and then replace them all in *.cshtml.vb:

html = Me.GetVbXml(Me.ViewData).ParseZML.Replace("&", "&")

But of course that's a kludge.

Any ideas for an elegant solution to this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions