xmlhtml-0.2.4: XML parser and renderer with HTML 5 quirks mode

Text.XmlHtml.HTML.Meta

Synopsis

# Documentation

Void elements as defined by the HTML5 spec.

Elements that XmlHtml treats as raw text by default. Raw text elements are not allowed to have any other tags in them. This is necessary to support the Javascript less than operator inside a script tag, for example.

The library uses the isRawText function everywhere instead of checking this set directly because that gives us an escape hatch to avoid the default behavior if necessary.

isRawText :: Text -> [(Text, Text)] -> Bool Source #

Determine whether a tag should be treated as raw text. Raw text elements are not allowed to have any other tags in them. This is necessary to support the Javascript less than operator inside a script tag, for example.

If a tag is in the rawTextTags set, this function allows you to override that behavior by adding the xmlhtmlNotRaw attribute. Conversely, if a tag is not in the rawTextTags set, this function allows you to override that by adding the xmlhtmlRaw attribute to the tag.

This is the function that is actually used in the parser and renderer. rawTextTags is not used any more, but is still provided for backwards compatibility and to let you see which tags are treated as raw by default.

List of elements with omittable end tags.

Tags which should be considered automatically ended in case one of a certain set of tags pops up.

Tags and attributes which should always be rendered with an explicit value, even when the value is empty. This is required by some web browsers for tags that are typically non-empty.

Predefined character entity references as defined by the HTML5 spec.