Skip to content

Latest commit

 

History

History
30 lines (20 loc) · 675 Bytes

attribute-value-entities.md

File metadata and controls

30 lines (20 loc) · 675 Bytes

Disallows unencoded HTML entities in attribute values (attribute-value-entities)

Reserved characters should be encoded as HTML entities in attribute values to avoid parsing errors.

For example, > should be represented as >.

Rule Details

This rule disallows using unencoded reserved characters in attribute values.

The following patterns are considered warnings:

html`<x-foo attr=">">`;
html`<x-foo attr="<">`;
html`<x-foo attr="&">`;
html`<x-foo attr='"'>`;

The following patterns are not warnings:

html`<x-foo attr="value">`;

When Not To Use It

If you don't care about potential parsing errors, then you will not need this rule.