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

Safe HaskellNone
LanguageHaskell98

Text.XmlHtml.HTML.Meta

Synopsis

Documentation

voidTags :: HashSet Text Source

Void elements as defined by the HTML5 spec.

rawTextTags :: HashSet Text Source

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.

endOmittableLast :: HashSet Text Source

List of elements with omittable end tags.

endOmittableNext :: HashMap Text (HashSet Text) Source

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

predefinedRefs :: HashMap Text Text Source

Predefined character entity references as defined by the HTML5 spec.