Skip to content

Invalid attributes name for names starting with '[' and '(' #118

Closed
@dvekeman

Description

@dvekeman

I need to embed a third party angular element.

When trying this out using the kotlinx.html DSL I ran into a problem that these angular elements have attribute names which start with '[' or '(' for example:

<todo "[todo]" = "todo"></todo>

For events they seem to use (someEvent).

Currently I am seeing

Tag some-tag has invalid attribute name (onsomeevent)

According to https://www.w3.org/TR/html/syntax.html:

Attributes for an element are expressed inside the element’s start tag.

Attributes have a name and a value. Attribute names must consist of one or more characters other than the space characters, U+0000 NULL, U+0022 QUOTATION MARK ("), U+0027 APOSTROPHE ('), U+003E GREATER-THAN SIGN (>), U+002F SOLIDUS (/), and U+003D EQUALS SIGN (=) characters, the control characters, and any characters that are not defined by Unicode. In the HTML syntax, attribute names, even those for foreign elements, may be written with any mix of lower- and uppercase letters that are an ASCII case-insensitive match for the attribute’s name.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions