blaze-builder-0.4.2.3: Efficient buffered output.

Copyright | (c) 2013 Leon P Smith
License | BSD3
Maintainer | https://github.com/blaze-builder
Stability | stable
Safe Haskell | Safe-Inferred
Language | Haskell98

Blaze.ByteString.Builder.Html.Utf8

Contents

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

Description

`Write`s and `Builder`s 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

- module Blaze.ByteString.Builder.Char.Utf8
- writeHtmlEscapedChar :: Char -> Write
- fromHtmlEscapedChar :: Char -> Builder
- fromHtmlEscapedString :: String -> Builder
- fromHtmlEscapedShow :: Show a => a -> Builder
- fromHtmlEscapedText :: Text -> Builder
- fromHtmlEscapedLazyText :: Text -> Builder

# Documentation

module Blaze.ByteString.Builder.Char.Utf8

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

writeHtmlEscapedChar :: Char -> Write Source #

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 -> Builder Source #

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

fromHtmlEscapedString :: String -> Builder Source #

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

fromHtmlEscapedShow :: Show a => a -> Builder Source #

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

fromHtmlEscapedText :: Text -> Builder Source #

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

fromHtmlEscapedLazyText :: Text -> Builder Source #

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