/functions/htmlentities/readme.php

Description

SquirrelMail html translation table documentation

SquirrelMail provides own implementation of htmlentities() and get_html_translation_table() functions. Functions are called sq_get_html_translation_table() and sq_htmlentities(). They are included in functions/strings.php

sq_htmlentities uses same syntax as functions available in php 4.1.0 sq_get_html_translation_table adds third option that sets charset.

 string sq_htmlentities ( string string [, int quote_style [, string charset]])
 array sq_get_html_translation_table ( int table [, int quote_style [, string charset]])

If sq_get_html_translation_table function is called with HTML_SPECIALCHARS option, it returns us-ascii translation table. If it is called with HTML_ENTITIES option, it returns translation table defined by charset. Function defaults to us-ascii charset and not to iso-8859-1.

Why own functions are used instead of htmlspecialchars() and htmlentities() provided by php.

  • a) removes dependency on options available only in php v.4.1+
  • b) default behavior of htmlentities() is disastrous in non iso-8859-1 environment.
  • c) provides better control of transformations.

 --- Full list of entities (w3.org html4.01 recommendations)
 1. regural symbols
 U+0022 - "
          (replaced only when $style is not ENT_NOQUOTES or 0)
 U+0026 - &
 U+0027 - '
          (replaced only when $style is ENT_QUOTES or 3)
 U+003C - <
 U+003E - >

 2. latin1 symbols (HTMLlat1.ent)
 U+00A0 -      -- no-break space = non-breaking space
 U+00A1 - ¡   -- inverted exclamation mark
 U+00A2 - ¢    -- cent sign
 U+00A3 - £   -- pound sign
 U+00A4 - ¤  -- currency sign
 U+00A5 - ¥     -- yen sign
 U+00A6 - ¦  -- broken bar
 U+00A7 - §    -- section sign
 U+00A8 - ¨     -- diaeresis
 U+00A9 - ©    -- copyright sign
 U+00AA - ª    -- feminine ordinal indicator
 U+00AB - «   -- left-pointing double angle quotation mark = left pointing guillemet
 U+00AC - ¬     -- not sign
 U+00AD - ­     -- soft hyphen = discretionary hyphen
 U+00AE - ®     -- registered sign = registered trade mark sign
 U+00AF - ¯    -- macron = spacing macron = overline = APL overbar
 U+00B0 - °     -- degree sign
 U+00B1 - ±  -- plus-minus sign = plus-or-minus sign
 U+00B2 - ²    -- superscript two = superscript digit two = squared
 U+00B3 - ³    -- superscript three = superscript digit three = cubed
 U+00B4 - ´   -- acute accent = spacing acute
 U+00B5 - µ   -- micro sign
 U+00B6 - ¶    -- pilcrow sign = paragraph sign
 U+00B7 - ·  -- middle dot = Georgian comma = Greek middle dot
 U+00B8 - ¸   -- cedilla = spacing cedilla
 U+00B9 - ¹    -- superscript one = superscript digit one
 U+00BA - º    -- masculine ordinal indicator
 U+00BB - »   -- right-pointing double angle quotation mark = right pointing guillemet
 U+00BC - ¼  -- vulgar fraction one quarter = fraction one quarter
 U+00BD - ½  -- vulgar fraction one half = fraction one half
 U+00BE - ¾  -- vulgar fraction three quarters = fraction three quarters
 U+00BF - ¿  -- inverted question mark = turned question mark
 U+0180 - À  -- latin capital letter A with grave = latin capital letter A grave,
 U+0181 - Á  -- latin capital letter A with acute
 U+0182 - Â   -- latin capital letter A with circumflex
 U+0183 - Ã  -- latin capital letter A with tilde
 U+0184 - Ä    -- latin capital letter A with diaeresis
 U+0185 - Å   -- latin capital letter A with ring above = latin capital letter A ring
 U+0186 - Æ   -- latin capital letter AE = latin capital ligature AE
 U+0187 - Ç  -- latin capital letter C with cedilla
 U+0188 - È  -- latin capital letter E with grave
 U+0189 - É  -- latin capital letter E with acute
 U+018A - Ê   -- latin capital letter E with circumflex
 U+018B - Ë    -- latin capital letter E with diaeresis
 U+018C - Ì  -- latin capital letter I with grave
 U+018D - Í  -- latin capital letter I with acute
 U+018E - Î   -- latin capital letter I with circumflex
 U+018F - Ï    -- latin capital letter I with diaeresis
 U+0190 - Ð     -- latin capital letter ETH
 U+0191 - Ñ  -- latin capital letter N with tilde
 U+0192 - Ò  -- latin capital letter O with grave
 U+0193 - Ó  -- latin capital letter O with acute
 U+0194 - Ô   -- latin capital letter O with circumflex
 U+0195 - Õ  -- latin capital letter O with tilde
 U+0196 - Ö    -- latin capital letter O with diaeresis
 U+0197 - ×   -- multiplication sign
 U+0198 - Ø  -- latin capital letter O with stroke = latin capital letter O slash
 U+0199 - Ù  -- latin capital letter U with grave
 U+019A - Ú  -- latin capital letter U with acute
 U+019B - Û   -- latin capital letter U with circumflex
 U+019C - Ü    -- latin capital letter U with diaeresis
 U+019D - Ý  -- latin capital letter Y with acute
 U+019E - Þ   -- latin capital letter THORN
 U+019F - ß   -- latin small letter sharp s = ess-zed
 U+01A0 - à  -- latin small letter a with grave = latin small letter a grave
 U+01A1 - á  -- latin small letter a with acute
 U+01A2 - â   -- latin small letter a with circumflex
 U+01A3 - ã  -- latin small letter a with tilde
 U+01A4 - ä    -- latin small letter a with diaeresis
 U+01A5 - å   -- latin small letter a with ring above = latin small letter a ring
 U+01A6 - æ   -- latin small letter ae = latin small ligature ae
 U+01A7 - ç  -- latin small letter c with cedilla
 U+01A8 - è  -- latin small letter e with grave
 U+01A9 - é  -- latin small letter e with acute
 U+01AA - ê   -- latin small letter e with circumflex
 U+01AB - ë    -- latin small letter e with diaeresis
 U+01AC - ì  -- latin small letter i with grave
 U+01AD - í  -- latin small letter i with acute
 U+01AE - î   -- latin small letter i with circumflex
 U+01AF - ï    -- latin small letter i with diaeresis
 U+01B0 - ð     -- latin small letter eth
 U+01B1 - ñ  -- latin small letter n with tilde
 U+01B2 - ò  -- latin small letter o with grave
 U+01B3 - ó  -- latin small letter o with acute
 U+01B4 - ô   -- latin small letter o with circumflex
 U+01B5 - õ  -- latin small letter o with tilde
 U+01B6 - ö    -- latin small letter o with diaeresis
 U+01B7 - ÷  -- division sign
 U+01B8 - ø  -- latin small letter o with stroke = latin small letter o slash,
 U+01B9 - ù  -- latin small letter u with grave
 U+01BA - ú  -- latin small letter u with acute
 U+01BB - û   -- latin small letter u with circumflex
 U+01BC - ü    -- latin small letter u with diaeresis
 U+01BD - ý  -- latin small letter y with acute
 U+01BE - þ   -- latin small letter thorn,
 U+01BF - ÿ    -- latin small letter y with diaeresis

 3. Special symbols (HTMLspecial.ent)
 Latin Extended-A
 U+0152 - Π --
 U+0153 - œ  -- latin small ligature oe
 U+0160 - Š -- latin capital letter S with caron
 U+0161 - š -- latin small letter s with caron
 U+0178 - Ÿ   -- latin capital letter Y with diaeresis
 Spacing Modifier Letters
 U+02C6 - ˆ   -- modifier letter circumflex accent
 U+02DC - ˜  -- small tilde
 General Punctuation
 U+2002 -     -- en space
 U+2003 -     -- em space
 U+2009 -   -- thin space
 U+200C - ‌   -- zero width non-joiner
 U+200D - ‍    -- zero width joiner
 U+200E - ‎    -- left-to-right mark
 U+200F - ‏    -- right-to-left mark
 U+2013 - –  -- en dash
 U+2014 - —  -- em dash
 U+2018 - ‘  -- left single quotation mark
 U+2019 - ’  -- right single quotation mark
 U+201A - ‚  -- single low-9 quotation mark
 U+201C - “  -- left double quotation mark
 U+201D - ”  -- right double quotation mark
 U+201E - „  -- double low-9 quotation mark
 U+2020 - † -- dagger
 U+2021 - ‡ -- double dagger
 U+2030 - ‰ -- per mille sign
 U+2039 - ‹ -- single left-pointing angle quotation mark
 U+203A - › -- single right-pointing angle quotation mark
 U+20AC - €   -- euro sign

 4. Other symbols (HTMLsymbol.ent)
 Latin Extended-B
 U+0192 - ƒ   -- latin small f with hook = function = florin
 Greek
 U+0391 - Α  -- greek capital letter alpha
 U+0392 - Β   -- greek capital letter beta
 U+0393 - Γ  -- greek capital letter gamma
 U+0394 - Δ  -- greek capital letter delta
 U+0395 - Ε -- greek capital letter epsilon
 U+0396 - Ζ   -- greek capital letter zeta
 U+0397 - Η    -- greek capital letter eta
 U+0398 - Θ  -- greek capital letter theta
 U+0399 - Ι   -- greek capital letter iota
 U+039A - Κ  -- greek capital letter kappa
 U+039B - Λ -- greek capital letter lambda
 U+039C - Μ     -- greek capital letter mu
 U+039D - Ν     -- greek capital letter nu
 U+039E - Ξ     -- greek capital letter xi
 U+039F - Ο -- greek capital letter omicron
 U+03A0 - Π     -- greek capital letter pi
 U+03A1 - Ρ    -- greek capital letter rho
 U+03A3 - Σ  -- greek capital letter sigma
 U+03A4 - Τ    -- greek capital letter tau
 U+03A5 - Υ -- greek capital letter upsilon
 U+03A6 - Φ     -- greek capital letter phi
 U+03A7 - Χ     -- greek capital letter chi
 U+03A8 - Ψ     -- greek capital letter psi
 U+03A9 - Ω   -- greek capital letter omega
 U+03B1 - α   -- greek small letter alpha
 U+03B2 - β    -- greek small letter beta
 U+03B3 - γ   -- greek small letter gamma
 U+03B4 - δ   -- greek small letter delta
 U+03B5 - ε -- greek small letter epsilon
 U+03B6 - ζ    -- greek small letter zeta
 U+03B7 - η     -- greek small letter eta
 U+03B8 - θ   -- greek small letter theta
 U+03B9 - ι    -- greek small letter iota
 U+03BA - κ   -- greek small letter kappa
 U+03BB - λ  -- greek small letter lambda
 U+03BC - μ      -- greek small letter mu
 U+03BD - ν      -- greek small letter nu
 U+03BE - ξ      -- greek small letter xi
 U+03BF - ο -- greek small letter omicron
 U+03C0 - π      -- greek small letter pi
 U+03C1 - ρ     -- greek small letter rho
 U+03C2 - ς  -- greek small letter final sigma
 U+03C3 - σ   -- greek small letter sigma
 U+03C4 - τ     -- greek small letter tau
 U+03C5 - υ -- greek small letter upsilon
 U+03C6 - φ     -- greek small letter phi
 U+03C7 - χ     -- greek small letter chi
 U+03C8 - ψ     -- greek small letter psi
 U+03C9 - ω   -- greek small letter omega
 U+03D1 - ϑ -- greek small letter theta symbol
 U+03D2 - ϒ    -- greek upsilon with hook symbol
 U+03D6 - ϖ      -- greek pi symbol

 General Punctuation
 U+2022 - •     -- bullet = black small circle
 U+2026 - …   -- horizontal ellipsis = three dot leader
 U+2032 - ′    -- prime = minutes = feet
 U+2033 - ″    -- double prime = seconds = inches
 U+203E - ‾    -- overline = spacing overscore
 U+2044 - ⁄    -- fraction slash

 Letterlike Symbols
 U+2118 - ℘   -- script capital P = power set = Weierstrass p
 U+2111 - ℑ    -- blackletter capital I = imaginary part
 U+211C - ℜ     -- blackletter capital R = real part symbol
 U+2122 - ™    -- trade mark sign
 U+2135 - ℵ  -- alef symbol = first transfinite cardinal

 Arrows
 U+2190 - ←     -- leftwards arrow
 U+2191 - ↑     -- upwards arrow
 U+2192 - →     -- rightwards arrow
 U+2193 - ↓     -- downwards arrow
 U+2194 - ↔     -- left right arrow
 U+21B5 - ↵    -- downwards arrow with corner leftwards = carriage return
 U+21D0 - ⇐     -- leftwards double arrow
 U+21D1 - ⇑     -- upwards double arrow
 U+21D2 - ⇒     -- rightwards double arrow
 U+21D3 - ⇓     -- downwards double arrow
 U+21D4 - ⇔     -- left right double arrow

 Mathematical Operators
 U+2200 - ∀   -- for all
 U+2202 - ∂     -- partial differential
 U+2203 - ∃    -- there exists
 U+2205 - ∅    -- empty set = null set = diameter
 U+2207 - ∇    -- nabla = backward difference
 U+2208 - ∈     -- element of
 U+2209 - ∉    -- not an element of
 U+220B - ∋       -- contains as member
 U+220F - ∏     -- n-ary product = product sign
 U+2211 - ∑      -- n-ary sumation
 U+2212 - −    -- minus sign
 U+2217 - ∗   -- asterisk operator
 U+221A - √    -- square root = radical sign
 U+221D - ∝     -- proportional to
 U+221E - ∞    -- infinity
 U+2220 - ∠      -- angle
 U+2227 - ∧      -- logical and = wedge
 U+2228 - ∨       -- logical or = vee
 U+2229 - ∩      -- intersection = cap
 U+222A - ∪      -- union = cup
 U+222B - ∫      -- integral
 U+2234 - ∴   -- therefore
 U+223C - ∼      -- tilde operator = varies with = similar to
 U+2245 - ≅     -- approximately equal to
 U+2248 - ≈    -- almost equal to = asymptotic to
 U+2260 - ≠       -- not equal to
 U+2261 - ≡    -- identical to
 U+2264 - ≤       -- less-than or equal to
 U+2265 - ≥       -- greater-than or equal to
 U+2282 - ⊂      -- subset of
 U+2283 - ⊃      -- superset of
 U+2284 - ⊄     -- not a subset of
 U+2286 - ⊆     -- subset of or equal to
 U+2287 - ⊇     -- superset of or equal to
 U+2295 - ⊕    -- circled plus = direct sum
 U+2297 - ⊗   -- circled times = vector product
 U+22A5 - ⊥     -- up tack = orthogonal to = perpendicular
 U+22C5 - ⋅     -- dot operator

 Miscellaneous Technical
 U+2308 - ⌈    -- left ceiling = apl upstile
 U+2309 - ⌉    -- right ceiling
 U+230A - ⌊   -- left floor = apl downstile
 U+230B - ⌋   -- right floor
 U+2329 - ⟨     -- left-pointing angle bracket = bra
 U+232A - ⟩     -- right-pointing angle bracket = ket

 Geometric Shapes
 U+25CA - ◊      -- lozenge

 Miscellaneous Symbols
 U+2660 - ♠   -- black spade suit
 U+2663 - ♣    -- black club suit = shamrock
 U+2665 - ♥   -- black heart suit = valentine
 U+2666 - ♦    -- black diamond suit

Documentation generated on Mon, 13 Jan 2020 04:23:23 +0100 by phpDocumentor 1.4.3