blaze-builder-0.3.1.0: Efficient buffered output.

Portabilitytested on GHC only
Stabilityexperimental
MaintainerSimon Meier <iridcode@gmail.com>
Safe HaskellSafe-Infered

Blaze.ByteString.Builder.Html.Utf8

Contents

Description

Writes and Builders for serializing HTML escaped and UTF-8 encoded characters.

This module is used by both the 'blaze-html' and the 'hamlet' HTML templating libraries. If the Builder from 'blaze-builder' replaces the Builder implementation, this module will most likely keep its place, as it provides a set of very specialized functions.

Synopsis

Documentation

Writing HTML escaped and UTF-8 encoded characters to a buffer

writeHtmlEscapedChar :: Char -> WriteSource

Write a HTML escaped and UTF-8 encoded Unicode character to a bufffer.

Creating Builders from HTML escaped and UTF-8 encoded characters

fromHtmlEscapedChar :: Char -> BuilderSource

O(1). Serialize a HTML escaped Unicode character using the UTF-8 encoding.

fromHtmlEscapedString :: String -> BuilderSource

O(n). Serialize a HTML escaped Unicode String using the UTF-8 encoding.

fromHtmlEscapedShow :: Show a => a -> BuilderSource

O(n). Serialize a value by Showing it and then, HTML escaping and UTF-8 encoding the resulting String.

fromHtmlEscapedText :: Text -> BuilderSource

O(n). Serialize a HTML escaped strict Unicode Text value using the UTF-8 encoding.

fromHtmlEscapedLazyText :: Text -> BuilderSource

O(n). Serialize a HTML escaped Unicode Text using the UTF-8 encoding.