--- /dev/null
+<?php
+/**
+ * Redirects to the login page.
+ *
+ * @copyright (c) 1999-2004 The SquirrelMail development team
+ * @license http://opensource.org/licenses/gpl-license.php GNU Public License
+ * @version $Id$
+ * @package squirrelmail
+ * @subpackage strings
+ */
+header("Location:../../src/login.php\n\n");
+exit();
+?>
--- /dev/null
+<?php
+/**
+ * iso-8859-1 html entities table
+ *
+ * @copyright (c) 2004 The SquirrelMail development team
+ * @license http://opensource.org/licenses/gpl-license.php GNU Public License
+ * @version $Id$
+ * @package squirrelmail
+ * @subpackage strings
+ */
+$sq_html_ent_table = array_merge($sq_html_ent_table,
+ array("\xA0" => ' ',
+ "\xA1" => '¡',
+ "\xA2" => '¢',
+ "\xA3" => '£',
+ "\xA4" => '¤',
+ "\xA5" => '¥',
+ "\xA6" => '¦',
+ "\xA7" => '§',
+ "\xA8" => '¨',
+ "\xA9" => '©',
+ "\xAA" => 'ª',
+ "\xAB" => '«',
+ "\xAC" => '¬',
+ "\xAD" => '­',
+ "\xAE" => '®',
+ "\xAF" => '¯',
+ "\xB0" => '°',
+ "\xB1" => '±',
+ "\xB2" => '²',
+ "\xB3" => '³',
+ "\xB4" => '´',
+ "\xB5" => 'µ',
+ "\xB6" => '¶',
+ "\xB7" => '·',
+ "\xB8" => '¸',
+ "\xB9" => '¹',
+ "\xBA" => 'º',
+ "\xBB" => '»',
+ "\xBC" => '¼',
+ "\xBD" => '½',
+ "\xBE" => '¾',
+ "\xBF" => '¿',
+ "\xC0" => 'À',
+ "\xC1" => 'Á',
+ "\xC2" => 'Â',
+ "\xC3" => 'Ã',
+ "\xC4" => 'Ä',
+ "\xC5" => 'Å',
+ "\xC6" => 'Æ',
+ "\xC7" => 'Ç',
+ "\xC8" => 'È',
+ "\xC9" => 'É',
+ "\xCA" => 'Ê',
+ "\xCB" => 'Ë',
+ "\xCC" => 'Ì',
+ "\xCD" => 'Í',
+ "\xCE" => 'Î',
+ "\xCF" => 'Ï',
+ "\xD0" => 'Ð',
+ "\xD1" => 'Ñ',
+ "\xD2" => 'Ò',
+ "\xD3" => 'Ó',
+ "\xD4" => 'Ô',
+ "\xD5" => 'Õ',
+ "\xD6" => 'Ö',
+ "\xD7" => '×',
+ "\xD8" => 'Ø',
+ "\xD9" => 'Ù',
+ "\xDA" => 'Ú',
+ "\xDB" => 'Û',
+ "\xDC" => 'Ü',
+ "\xDD" => 'Ý',
+ "\xDE" => 'Þ',
+ "\xDF" => 'ß',
+ "\xE0" => 'à',
+ "\xE1" => 'á',
+ "\xE2" => 'â',
+ "\xE3" => 'ã',
+ "\xE4" => 'ä',
+ "\xE5" => 'å',
+ "\xE6" => 'æ',
+ "\xE7" => 'ç',
+ "\xE8" => 'è',
+ "\xE9" => 'é',
+ "\xEA" => 'ê',
+ "\xEB" => 'ë',
+ "\xEC" => 'ì',
+ "\xED" => 'í',
+ "\xEE" => 'î',
+ "\xEF" => 'ï',
+ "\xF0" => 'ð',
+ "\xF1" => 'ñ',
+ "\xF2" => 'ò',
+ "\xF3" => 'ó',
+ "\xF4" => 'ô',
+ "\xF5" => 'õ',
+ "\xF6" => 'ö',
+ "\xF7" => '÷',
+ "\xF8" => 'ø',
+ "\xF9" => 'ù',
+ "\xFA" => 'ú',
+ "\xFB" => 'û',
+ "\xFC" => 'ü',
+ "\xFD" => 'ý',
+ "\xFE" => 'þ',
+ "\xFF" => 'ÿ')
+ );
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/**
+ * 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
+ *
+ * @copyright (c) 2004 The SquirrelMail development team
+ * @license http://opensource.org/licenses/gpl-license.php GNU Public License
+ * @version $Id$
+ * @package squirrelmail
+ * @subpackage strings
+ */
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/**
+ * utf-8 html entities table
+ *
+ * @copyright (c) 2004 The SquirrelMail development team
+ * @license http://opensource.org/licenses/gpl-license.php GNU Public License
+ * @version $Id$
+ * @package squirrelmail
+ * @subpackage strings
+ */
+$sq_html_ent_table = array_merge($sq_html_ent_table,
+ array(// Latin1
+ "\xC2\xA0" => ' ',
+ "\xC2\xA1" => '¡',
+ "\xC2\xA2" => '¢',
+ "\xC2\xA3" => '£',
+ "\xC2\xA4" => '¤',
+ "\xC2\xA5" => '¥',
+ "\xC2\xA6" => '¦',
+ "\xC2\xA7" => '§',
+ "\xC2\xA8" => '¨',
+ "\xC2\xA9" => '©',
+ "\xC2\xAA" => 'ª',
+ "\xC2\xAB" => '«',
+ "\xC2\xAC" => '¬',
+ "\xC2\xAD" => '­',
+ "\xC2\xAE" => '®',
+ "\xC2\xAF" => '¯',
+ "\xC2\xB0" => '°',
+ "\xC2\xB1" => '±',
+ "\xC2\xB2" => '²',
+ "\xC2\xB3" => '³',
+ "\xC2\xB4" => '´',
+ "\xC2\xB5" => 'µ',
+ "\xC2\xB6" => '¶',
+ "\xC2\xB7" => '·',
+ "\xC2\xB8" => '¸',
+ "\xC2\xB9" => '¹',
+ "\xC2\xBA" => 'º',
+ "\xC2\xBB" => '»',
+ "\xC2\xBC" => '¼',
+ "\xC2\xBD" => '½',
+ "\xC2\xBE" => '¾',
+ "\xC2\xBF" => '¿',
+ "\xC3\x80" => 'À',
+ "\xC3\x81" => 'Á',
+ "\xC3\x82" => 'Â',
+ "\xC3\x83" => 'Ã',
+ "\xC3\x84" => 'Ä',
+ "\xC3\x85" => 'Å',
+ "\xC3\x86" => 'Æ',
+ "\xC3\x87" => 'Ç',
+ "\xC3\x88" => 'È',
+ "\xC3\x89" => 'É',
+ "\xC3\x8A" => 'Ê',
+ "\xC3\x8B" => 'Ë',
+ "\xC3\x8C" => 'Ì',
+ "\xC3\x8D" => 'Í',
+ "\xC3\x8E" => 'Î',
+ "\xC3\x8F" => 'Ï',
+ "\xC3\x90" => 'Ð',
+ "\xC3\x91" => 'Ñ',
+ "\xC3\x92" => 'Ò',
+ "\xC3\x93" => 'Ó',
+ "\xC3\x94" => 'Ô',
+ "\xC3\x95" => 'Õ',
+ "\xC3\x96" => 'Ö',
+ "\xC3\x97" => '×',
+ "\xC3\x98" => 'Ø',
+ "\xC3\x99" => 'Ù',
+ "\xC3\x9A" => 'Ú',
+ "\xC3\x9B" => 'Û',
+ "\xC3\x9C" => 'Ü',
+ "\xC3\x9D" => 'Ý',
+ "\xC3\x9E" => 'Þ',
+ "\xC3\x9F" => 'ß',
+ "\xC3\xA0" => 'à',
+ "\xC3\xA1" => 'á',
+ "\xC3\xA2" => 'â',
+ "\xC3\xA3" => 'ã',
+ "\xC3\xA4" => 'ä',
+ "\xC3\xA5" => 'å',
+ "\xC3\xA6" => 'æ',
+ "\xC3\xA7" => 'ç',
+ "\xC3\xA8" => 'è',
+ "\xC3\xA9" => 'é',
+ "\xC3\xAA" => 'ê',
+ "\xC3\xAB" => 'ë',
+ "\xC3\xAC" => 'ì',
+ "\xC3\xAD" => 'í',
+ "\xC3\xAE" => 'î',
+ "\xC3\xAF" => 'ï',
+ "\xC3\xB0" => 'ð',
+ "\xC3\xB1" => 'ñ',
+ "\xC3\xB2" => 'ò',
+ "\xC3\xB3" => 'ó',
+ "\xC3\xB4" => 'ô',
+ "\xC3\xB5" => 'õ',
+ "\xC3\xB6" => 'ö',
+ "\xC3\xB7" => '÷',
+ "\xC3\xB8" => 'ø',
+ "\xC3\xB9" => 'ù',
+ "\xC3\xBA" => 'ú',
+ "\xC3\xBB" => 'û',
+ "\xC3\xBC" => 'ü',
+ "\xC3\xBD" => 'ý',
+ "\xC3\xBE" => 'þ',
+ "\xC3\xBF" => 'ÿ',
+ // Latin Extended-A
+ "\xC5\x92" => 'Œ',
+ "\xC5\x93" => 'œ',
+ "\xC5\xA0" => 'Š',
+ "\xC5\xA1" => 'š',
+ "\xC5\xB8" => 'Ÿ',
+ // Spacing Modifier Letters
+ "\xCB\x86" => 'ˆ',
+ "\xCB\x9C" => '˜',
+ // General Punctuation
+ "\xE2\x80\x82" => ' ',
+ "\xE2\x80\x83" => ' ',
+ "\xE2\x80\x89" => ' ',
+ "\xE2\x80\x8C" => '‌',
+ "\xE2\x80\x8D" => '‍',
+ "\xE2\x80\x8E" => '‎',
+ "\xE2\x80\x8F" => '‏',
+ "\xE2\x80\x93" => '–',
+ "\xE2\x80\x94" => '—',
+ "\xE2\x80\x98" => '‘',
+ "\xE2\x80\x99" => '’',
+ "\xE2\x80\x9A" => '‚',
+ "\xE2\x80\x9C" => '“',
+ "\xE2\x80\x9D" => '”',
+ "\xE2\x80\x9E" => '„',
+ "\xE2\x80\xA0" => '†',
+ "\xE2\x80\xA1" => '‡',
+ "\xE2\x80\xB0" => '‰',
+ "\xE2\x80\xB9" => '‹',
+ "\xE2\x80\xBA" => '›',
+ "\xE2\x82\xAC" => '€',
+ // Latin Extended-B
+ "\xC6\x92" => 'ƒ',
+ // Greek
+ "\xCE\x91" => 'Α',
+ "\xCE\x92" => 'Β',
+ "\xCE\x93" => 'Γ',
+ "\xCE\x94" => 'Δ',
+ "\xCE\x95" => 'Ε',
+ "\xCE\x96" => 'Ζ',
+ "\xCE\x97" => 'Η',
+ "\xCE\x98" => 'Θ',
+ "\xCE\x99" => 'Ι',
+ "\xCE\x9A" => 'Κ',
+ "\xCE\x9B" => 'Λ',
+ "\xCE\x9C" => 'Μ',
+ "\xCE\x9D" => 'Ν',
+ "\xCE\x9E" => 'Ξ',
+ "\xCE\x9F" => 'Ο',
+ "\xCE\xA0" => 'Π',
+ "\xCE\xA1" => 'Ρ',
+ "\xCE\xA3" => 'Σ',
+ "\xCE\xA4" => 'Τ',
+ "\xCE\xA5" => 'Υ',
+ "\xCE\xA6" => 'Φ',
+ "\xCE\xA7" => 'Χ',
+ "\xCE\xA8" => 'Ψ',
+ "\xCE\xA9" => 'Ω',
+ "\xCE\xB1" => 'α',
+ "\xCE\xB2" => 'β',
+ "\xCE\xB3" => 'γ',
+ "\xCE\xB4" => 'δ',
+ "\xCE\xB5" => 'ε',
+ "\xCE\xB6" => 'ζ',
+ "\xCE\xB7" => 'η',
+ "\xCE\xB8" => 'θ',
+ "\xCE\xB9" => 'ι',
+ "\xCE\xBA" => 'κ',
+ "\xCE\xBB" => 'λ',
+ "\xCE\xBC" => 'μ',
+ "\xCE\xBD" => 'ν',
+ "\xCE\xBE" => 'ξ',
+ "\xCE\xBF" => 'ο',
+ "\xCF\x80" => 'π',
+ "\xCF\x81" => 'ρ',
+ "\xCF\x82" => 'ς',
+ "\xCF\x83" => 'σ',
+ "\xCF\x84" => 'τ',
+ "\xCF\x85" => 'υ',
+ "\xCF\x86" => 'φ',
+ "\xCF\x87" => 'χ',
+ "\xCF\x88" => 'ψ',
+ "\xCF\x89" => 'ω',
+ "\xCF\x91" => 'ϑ',
+ "\xCF\x92" => 'ϒ',
+ "\xCF\x96" => 'ϖ',
+ // General Punctuation
+ "\xE2\x80\xA2" => '•',
+ "\xE2\x80\xA6" => '…',
+ "\xE2\x80\xB2" => '′',
+ "\xE2\x80\xB3" => '″',
+ "\xE2\x80\xBE" => '‾',
+ "\xE2\x81\x84" => '⁄',
+ // Letterlike Symbols
+ "\xE2\x84\x98" => '℘',
+ "\xE2\x84\x91" => 'ℑ',
+ "\xE2\x84\x9C" => 'ℜ',
+ "\xE2\x84\xA2" => '™',
+ "\xE2\x84\xB5" => 'ℵ',
+ // Arrows
+ "\xE2\x86\x90" => '←',
+ "\xE2\x86\x91" => '↑',
+ "\xE2\x86\x92" => '→',
+ "\xE2\x86\x93" => '↓',
+ "\xE2\x86\x94" => '↔',
+ "\xE2\x86\xB5" => '↵',
+ "\xE2\x87\x90" => '⇐',
+ "\xE2\x87\x91" => '⇑',
+ "\xE2\x87\x92" => '⇒',
+ "\xE2\x87\x93" => '⇓',
+ "\xE2\x87\x94" => '⇔',
+ // Mathematical Operators
+ "\xE2\x88\x80" => '∀',
+ "\xE2\x88\x82" => '∂',
+ "\xE2\x88\x83" => '∃',
+ "\xE2\x88\x85" => '∅',
+ "\xE2\x88\x87" => '∇',
+ "\xE2\x88\x88" => '∈',
+ "\xE2\x88\x89" => '∉',
+ "\xE2\x88\x8B" => '∋',
+ "\xE2\x88\x8F" => '∏',
+ "\xE2\x88\x91" => '∑',
+ "\xE2\x88\x92" => '−',
+ "\xE2\x88\x97" => '∗',
+ "\xE2\x88\x9A" => '√',
+ "\xE2\x88\x9D" => '∝',
+ "\xE2\x88\x9E" => '∞',
+ "\xE2\x88\xA0" => '∠',
+ "\xE2\x88\xA7" => '∧',
+ "\xE2\x88\xA8" => '∨',
+ "\xE2\x88\xA9" => '∩',
+ "\xE2\x88\xAA" => '∪',
+ "\xE2\x88\xAB" => '∫',
+ "\xE2\x88\xB4" => '∴',
+ "\xE2\x88\xBC" => '∼',
+ "\xE2\x89\x85" => '≅',
+ "\xE2\x89\x88" => '≈',
+ "\xE2\x89\xA0" => '≠',
+ "\xE2\x89\xA1" => '≡',
+ "\xE2\x89\xA4" => '≤',
+ "\xE2\x89\xA5" => '≥',
+ "\xE2\x8A\x82" => '⊂',
+ "\xE2\x8A\x83" => '⊃',
+ "\xE2\x8A\x84" => '⊄',
+ "\xE2\x8A\x86" => '⊆',
+ "\xE2\x8A\x87" => '⊇',
+ "\xE2\x8A\x95" => '⊕',
+ "\xE2\x8A\x97" => '⊗',
+ "\xE2\x8A\xA5" => '⊥',
+ "\xE2\x8B\x85" => '⋅',
+ // Miscellaneous Technical
+ "\xE2\x8C\x88" => '⌈',
+ "\xE2\x8C\x89" => '⌉',
+ "\xE2\x8C\x8A" => '⌊',
+ "\xE2\x8C\x8B" => '⌋',
+ "\xE2\x8C\xA9" => '⟨',
+ "\xE2\x8C\xAA" => '⟩',
+ // Geometric Shapes
+ "\xE2\x97\x8A" => '◊',
+ // Miscellaneous Symbols
+ "\xE2\x99\xA0" => '♠',
+ "\xE2\x99\xA3" => '♣',
+ "\xE2\x99\xA5" => '♥',
+ "\xE2\x99\xA6" => '♦'
+ )
+ );
+?>
\ No newline at end of file
return $count;
}
+/**
+ * sq_get_html_translation_table
+ *
+ * Returns the translation table used by sq_htmlentities()
+ *
+ * @param integer $table html translation table. Possible values (without quotes):
+ * HTML_ENTITIES - full html entities table defined by charset
+ * HTML_SPECIALCHARS - html special characters table
+ * @param integer $quote_style quote encoding style. Possible values (without quotes):
+ * ENT_COMPAT - (default) encode double quotes
+ * ENT_NOQUOTES - don't encode double or single quotes
+ * ENT_QUOTES - encode double and single quotes
+ * @param string $charset charset used for encoding. default to us-ascii, 'auto' uses $default_charset global value.
+ * @return array html translation array
+ */
+function sq_get_html_translation_table($table,$quote_style=ENT_COMPAT,$charset='us-ascii') {
+ global $default_charset;
+
+ if ($table == HTML_SPECIALCHARS) $charset='us-ascii';
+
+ // Start array with ampersand
+ $sq_html_ent_table = array( "&" => '&' );
+
+ // < and >
+ $sq_html_ent_table = array_merge($sq_html_ent_table,
+ array("<" => '<',
+ ">" => '>')
+ );
+ // double quotes
+ if ($quote_style == ENT_COMPAT)
+ $sq_html_ent_table = array_merge($sq_html_ent_table,
+ array("\"" => '"')
+ );
+
+ // double and single quotes
+ if ($quote_style == ENT_QUOTES)
+ $sq_html_ent_table = array_merge($sq_html_ent_table,
+ array("\"" => '"',
+ "'" => ''')
+ );
+
+ if ($charset=='auto') $charset=$default_charset;
+
+ // add entities that depend on charset
+ switch($charset){
+ case 'iso-8859-1':
+ include_once(SM_PATH . 'functions/htmlentities/iso-8859-1.php');
+ break;
+ case 'utf-8':
+ include_once(SM_PATH . 'functions/htmlentities/utf-8.php');
+ break;
+ case 'us-ascii':
+ default:
+ break;
+ }
+ // return table
+ return $sq_html_ent_table;
+}
+
+/**
+ * sq_htmlentities
+ *
+ * Convert all applicable characters to HTML entities.
+ * Minimal php requirement - v.4.0.5
+ *
+ * @param string $string string that has to be sanitized
+ * @param integer $quote_style quote encoding style. Possible values (without quotes):
+ * ENT_COMPAT - (default) encode double quotes
+ * ENT_NOQUOTES - don't encode double or single quotes
+ * ENT_QUOTES - encode double and single quotes
+ * @param string $charset charset used for encoding. defaults to 'us-ascii', 'auto' uses $default_charset global value.
+ * @return string sanitized string
+ */
+function sq_htmlentities($string,$quote_style=ENT_COMPAT,$charset='us-ascii') {
+ // get translation table
+ $sq_html_ent_table=sq_get_html_translation_table(HTML_ENTITIES,$quote_style,$charset);
+ // convert characters
+ return str_replace(array_keys($sq_html_ent_table),array_values($sq_html_ent_table),$string);
+}
+
$PHP_SELF = php_self();
?>
\ No newline at end of file