HORIZON HASKELLDocslts/ghc-10.0.x8fef28d2026-11-02Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8fef28d · 2026-11-02

Moduletagsoup-0.14.8Haskell2010

Text.HTML.TagSoup.Entity

This module converts between HTML/XML entities (i.e. &) and the characters they represent.

Synopsis
  • Packagetagsoup-0.14.8
  • Exports6
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceEntity.hs

Lookup a numeric entity, the leading '#' must have already been removed.

lookupNumericEntity "65" == Just "A"
lookupNumericEntity "x41" == Just "A"
lookupNumericEntity "x4E" === Just "N"
lookupNumericEntity "x4e" === Just "N"
lookupNumericEntity "X4e" === Just "N"
lookupNumericEntity "Haskell" == Nothing
lookupNumericEntity "" == Nothing
lookupNumericEntity "89439085908539082" == Nothing

Escape an XML string.

escapeXML "hello world" == "hello world"
escapeXML "hello & world" == "hello & world"