Safe Haskell | Safe |
---|---|
Language | Haskell98 |
Documentation
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.