ae.utils.xml.entities

XML/HTML entity encoding/decoding.

Members

Aliases

convertEntities
deprecated alias convertEntities = decodeEntities
Undocumented in source.
encodeEntities
alias encodeEntities = _encodeEntitiesImpl!(false, (char c) => c == '<' || c == '>' || c == '"' || c == '\'' || c == '&')

Encode HTML entities and return the resulting string.

putEncodedEntities
alias putEncodedEntities = _putEncodedEntitiesImpl!(false, (char c) => c == '<' || c == '>' || c == '"' || c == '\'' || c == '&')

Write a string to a sink, encoding HTML entities.

Functions

_encodeEntitiesImpl
string _encodeEntitiesImpl(string str)
Undocumented in source. Be warned that the author may not have intended to support it.
decodeEntities
string decodeEntities(string str)

Decode HTML entities and return the resulting string.

encodeAllEntities
string encodeAllEntities(string str)

Encode all known characters as HTML entities.

Templates

_putEncodedEntitiesImpl
template _putEncodedEntitiesImpl(bool unicode, alias pred)
Undocumented in source.

Variables

entities
dchar[string] entities;

A mapping from HTML entity names to dchar.

entityNames
string[dchar] entityNames;

A mapping from dchar to the corresponding HTML entity name.

Meta

License

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.

Authors

Vladimir Panteleev <ae@cy.md> Simon Arlott