package html
var (
singleQuoteEntityBytes = []byte("'")
doubleQuoteEntityBytes = []byte(""")
)
// EscapeAttrVal returns the escaped attribute value bytes without quotes.
func EscapeAttrVal(buf *[]byte, orig, b []byte, isXML bool) []byte {
singles := 0
doubles := 0
unquoted := true
entities := false
for _, c := range b {
if charTable[c] {
unquoted = false
if c == '"' {
doubles++
} else if c == '\'' {
singles++
}
}
}
if unquoted && !isXML {
return b
} else if !entities && len(orig) == len(b)+2 && (singles == 0 && orig[0] == '\'' || doubles == 0 && orig[0] == '"') {
return orig
}
n := len(b) + 2
var quote byte
var escapedQuote []byte
if singles >= doubles || isXML {
n += doubles * 4
quote = '"'
escapedQuote = doubleQuoteEntityBytes
} else {
n += singles * 4
quote = '\''
escapedQuote = singleQuoteEntityBytes
}
if n > cap(*buf) {
*buf = make([]byte, 0, n) // maximum size, not actual size
}
t := (*buf)[:n] // maximum size, not actual size
t[0] = quote
j := 1
start := 0
for i, c := range b {
if c == quote {
j += copy(t[j:], b[start:i])
j += copy(t[j:], escapedQuote)
start = i + 1
}
}
j += copy(t[j:], b[start:])
t[j] = quote
return t[:j+1]
}
var charTable = [256]bool{
// ASCII
false, false, false, false, false, false, false, false,
false, true, true, false, true, true, false, false, // tab, line feed, form feed, carriage return
false, false, false, false, false, false, false, false,
false, false, false, false, false, false, false, false,
true, false, true, false, false, false, false, true, // space, "), '
false, false, false, false, false, false, false, false,
false, false, false, false, false, false, false, false,
false, false, false, false, true, true, true, false, // <, =, >
false, false, false, false, false, false, false, false,
false, false, false, false, false, false, false, false,
false, false, false, false, false, false, false, false,
false, false, false, false, false, false, false, false,
true, false, false, false, false, false, false, false, // `
false, false, false, false, false, false, false, false,
false, false, false, false, false, false, false, false,
false, false, false, false, false, false, false, false,
// non-ASCII
false, false, false, false, false, false, false, false,
false, false, false, false, false, false, false, false,
false, false, false, false, false, false, false, false,
false, false, false, false, false, false, false, false,
false, false, false, false, false, false, false, false,
false, false, false, false, false, false, false, false,
false, false, false, false, false, false, false, false,
false, false, false, false, false, false, false, false,
false, false, false, false, false, false, false, false,
false, false, false, false, false, false, false, false,
false, false, false, false, false, false, false, false,
false, false, false, false, false, false, false, false,
false, false, false, false, false, false, false, false,
false, false, false, false, false, false, false, false,
false, false, false, false, false, false, false, false,
false, false, false, false, false, false, false, false,
}
// Entities are all named character entities.
var EntitiesMap = map[string][]byte{
"AElig": []byte("Æ"),
"AMP": []byte("&"),
"Aacute": []byte("Á"),
"Abreve": []byte("Ă"),
"Acirc": []byte("Â"),
"Agrave": []byte("À"),
"Alpha": []byte("Α"),
"Amacr": []byte("Ā"),
"Aogon": []byte("Ą"),
"ApplyFunction": []byte("⁡"),
"Aring": []byte("Å"),
"Assign": []byte("≔"),
"Atilde": []byte("Ã"),
"Backslash": []byte("∖"),
"Barwed": []byte("⌆"),
"Because": []byte("∵"),
"Bernoullis": []byte("ℬ"),
"Breve": []byte("˘"),
"Bumpeq": []byte("≎"),
"Cacute": []byte("Ć"),
"CapitalDifferentialD": []byte("ⅅ"),
"Cayleys": []byte("ℭ"),
"Ccaron": []byte("Č"),
"Ccedil": []byte("Ç"),
"Ccirc": []byte("Ĉ"),
"Cconint": []byte("∰"),
"Cedilla": []byte("¸"),
"CenterDot": []byte("·"),
"CircleDot": []byte("⊙"),
"CircleMinus": []byte("⊖"),
"CirclePlus": []byte("⊕"),
"CircleTimes": []byte("⊗"),
"ClockwiseContourIntegral": []byte("∲"),
"CloseCurlyDoubleQuote": []byte("”"),
"CloseCurlyQuote": []byte("’"),
"Congruent": []byte("≡"),
"Conint": []byte("∯"),
"ContourIntegral": []byte("∮"),
"Coproduct": []byte("∐"),
"CounterClockwiseContourIntegral": []byte("∳"),
"CupCap": []byte("≍"),
"DDotrahd": []byte("⤑"),
"Dagger": []byte("‡"),
"Dcaron": []byte("Ď"),
"Delta": []byte("Δ"),
"DiacriticalAcute": []byte("´"),
"DiacriticalDot": []byte("˙"),
"DiacriticalDoubleAcute": []byte("˝"),
"DiacriticalGrave": []byte("`"),
"DiacriticalTilde": []byte("˜"),
"Diamond": []byte("⋄"),
"DifferentialD": []byte("ⅆ"),
"DotDot": []byte("⃜"),
"DotEqual": []byte("≐"),
"DoubleContourIntegral": []byte("∯"),
"DoubleDot": []byte("¨"),
"DoubleDownArrow": []byte("⇓"),
"DoubleLeftArrow": []byte("⇐"),
"DoubleLeftRightArrow": []byte("⇔"),
"DoubleLeftTee": []byte("⫤"),
"DoubleLongLeftArrow": []byte("⟸"),
"DoubleLongLeftRightArrow": []byte("⟺"),
"DoubleLongRightArrow": []byte("⟹"),
"DoubleRightArrow": []byte("⇒"),
"DoubleRightTee": []byte("⊨"),
"DoubleUpArrow": []byte("⇑"),
"DoubleUpDownArrow": []byte("⇕"),
"DoubleVerticalBar": []byte("∥"),
"DownArrow": []byte("↓"),
"DownArrowBar": []byte("⤓"),
"DownArrowUpArrow": []byte("⇵"),
"DownBreve": []byte("̑"),
"DownLeftRightVector": []byte("⥐"),
"DownLeftTeeVector": []byte("⥞"),
"DownLeftVector": []byte("↽"),
"DownLeftVectorBar": []byte("⥖"),
"DownRightTeeVector": []byte("⥟"),
"DownRightVector": []byte("⇁"),
"DownRightVectorBar": []byte("⥗"),
"DownTee": []byte("⊤"),
"DownTeeArrow": []byte("↧"),
"Downarrow": []byte("⇓"),
"Dstrok": []byte("Đ"),
"Eacute": []byte("É"),
"Ecaron": []byte("Ě"),
"Ecirc": []byte("Ê"),
"Egrave": []byte("È"),
"Element": []byte("∈"),
"Emacr": []byte("Ē"),
"EmptySmallSquare": []byte("◻"),
"EmptyVerySmallSquare": []byte("▫"),
"Eogon": []byte("Ę"),
"Epsilon": []byte("Ε"),
"EqualTilde": []byte("≂"),
"Equilibrium": []byte("⇌"),
"Exists": []byte("∃"),
"ExponentialE": []byte("ⅇ"),
"FilledSmallSquare": []byte("◼"),
"FilledVerySmallSquare": []byte("▪"),
"ForAll": []byte("∀"),
"Fouriertrf": []byte("ℱ"),
"GT": []byte(">"),
"Gamma": []byte("Γ"),
"Gammad": []byte("Ϝ"),
"Gbreve": []byte("Ğ"),
"Gcedil": []byte("Ģ"),
"Gcirc": []byte("Ĝ"),
"GreaterEqual": []byte("≥"),
"GreaterEqualLess": []byte("⋛"),
"GreaterFullEqual": []byte("≧"),
"GreaterGreater": []byte("⪢"),
"GreaterLess": []byte("≷"),
"GreaterSlantEqual": []byte("⩾"),
"GreaterTilde": []byte("≳"),
"HARDcy": []byte("Ъ"),
"Hacek": []byte("ˇ"),
"Hat": []byte("^"),
"Hcirc": []byte("Ĥ"),
"HilbertSpace": []byte("ℋ"),
"HorizontalLine": []byte("─"),
"Hstrok": []byte("Ħ"),
"HumpDownHump": []byte("≎"),
"HumpEqual": []byte("≏"),
"IJlig": []byte("IJ"),
"Iacute": []byte("Í"),
"Icirc": []byte("Î"),
"Ifr": []byte("ℑ"),
"Igrave": []byte("Ì"),
"Imacr": []byte("Ī"),
"ImaginaryI": []byte("ⅈ"),
"Implies": []byte("⇒"),
"Integral": []byte("∫"),
"Intersection": []byte("⋂"),
"InvisibleComma": []byte("⁣"),
"InvisibleTimes": []byte("⁢"),
"Iogon": []byte("Į"),
"Itilde": []byte("Ĩ"),
"Jcirc": []byte("Ĵ"),
"Jsercy": []byte("Ј"),
"Kappa": []byte("Κ"),
"Kcedil": []byte("Ķ"),
"LT": []byte("<"),
"Lacute": []byte("Ĺ"),
"Lambda": []byte("Λ"),
"Laplacetrf": []byte("ℒ"),
"Lcaron": []byte("Ľ"),
"Lcedil": []byte("Ļ"),
"LeftAngleBracket": []byte("〈"),
"LeftArrow": []byte("←"),
"LeftArrowBar": []byte("⇤"),
"LeftArrowRightArrow": []byte("⇆"),
"LeftCeiling": []byte("⌈"),
"LeftDoubleBracket": []byte("⟦"),
"LeftDownTeeVector": []byte("⥡"),
"LeftDownVector": []byte("⇃"),
"LeftDownVectorBar": []byte("⥙"),
"LeftFloor": []byte("⌊"),
"LeftRightArrow": []byte("↔"),
"LeftRightVector": []byte("⥎"),
"LeftTee": []byte("⊣"),
"LeftTeeArrow": []byte("↤"),
"LeftTeeVector": []byte("⥚"),
"LeftTriangle": []byte("⊲"),
"LeftTriangleBar": []byte("⧏"),
"LeftTriangleEqual": []byte("⊴"),
"LeftUpDownVector": []byte("⥑"),
"LeftUpTeeVector": []byte("⥠"),
"LeftUpVector": []byte("↿"),
"LeftUpVectorBar": []byte("⥘"),
"LeftVector": []byte("↼"),
"LeftVectorBar": []byte("⥒"),
"Leftarrow": []byte("⇐"),
"Leftrightarrow": []byte("⇔"),
"LessEqualGreater": []byte("⋚"),
"LessFullEqual": []byte("≦"),
"LessGreater": []byte("≶"),
"LessLess": []byte("⪡"),
"LessSlantEqual": []byte("⩽"),
"LessTilde": []byte("≲"),
"Lleftarrow": []byte("⇚"),
"Lmidot": []byte("Ŀ"),
"LongLeftArrow": []byte("⟵"),
"LongLeftRightArrow": []byte("⟷"),
"LongRightArrow": []byte("⟶"),
"Longleftarrow": []byte("⟸"),
"Longleftrightarrow": []byte("⟺"),
"Longrightarrow": []byte("⟹"),
"LowerLeftArrow": []byte("↙"),
"LowerRightArrow": []byte("↘"),
"Lstrok": []byte("Ł"),
"MediumSpace": []byte(" "),
"Mellintrf": []byte("ℳ"),
"MinusPlus": []byte("∓"),
"Nacute": []byte("Ń"),
"Ncaron": []byte("Ň"),
"Ncedil": []byte("Ņ"),
"NegativeMediumSpace": []byte(""),
"NegativeThickSpace": []byte(""),
"NegativeThinSpace": []byte(""),
"NegativeVeryThinSpace": []byte(""),
"NestedGreaterGreater": []byte("≫"),
"NestedLessLess": []byte("≪"),
"NewLine": []byte("\n"),
"NoBreak": []byte(""),
"NonBreakingSpace": []byte(" "),
"NotCongruent": []byte("≢"),
"NotCupCap": []byte("≭"),
"NotDoubleVerticalBar": []byte("∦"),
"NotElement": []byte("∉"),
"NotEqual": []byte("≠"),
"NotExists": []byte("∄"),
"NotGreater": []byte("≯"),
"NotGreaterEqual": []byte("≱"),
"NotGreaterLess": []byte("≹"),
"NotGreaterTilde": []byte("≵"),
"NotLeftTriangle": []byte("⋪"),
"NotLeftTriangleEqual": []byte("⋬"),
"NotLess": []byte("≮"),
"NotLessEqual": []byte("≰"),
"NotLessGreater": []byte("≸"),
"NotLessTilde": []byte("≴"),
"NotPrecedes": []byte("⊀"),
"NotPrecedesSlantEqual": []byte("⋠"),
"NotReverseElement": []byte("∌"),
"NotRightTriangle": []byte("⋫"),
"NotRightTriangleEqual": []byte("⋭"),
"NotSquareSubsetEqual": []byte("⋢"),
"NotSquareSupersetEqual": []byte("⋣"),
"NotSubsetEqual": []byte("⊈"),
"NotSucceeds": []byte("⊁"),
"NotSucceedsSlantEqual": []byte("⋡"),
"NotSupersetEqual": []byte("⊉"),
"NotTilde": []byte("≁"),
"NotTildeEqual": []byte("≄"),
"NotTildeFullEqual": []byte("≇"),
"NotTildeTilde": []byte("≉"),
"NotVerticalBar": []byte("∤"),
"Ntilde": []byte("Ñ"),
"OElig": []byte("Œ"),
"Oacute": []byte("Ó"),
"Ocirc": []byte("Ô"),
"Odblac": []byte("Ő"),
"Ograve": []byte("Ò"),
"Omacr": []byte("Ō"),
"Omega": []byte("Ω"),
"Omicron": []byte("Ο"),
"OpenCurlyDoubleQuote": []byte("“"),
"OpenCurlyQuote": []byte("‘"),
"Oslash": []byte("Ø"),
"Otilde": []byte("Õ"),
"OverBar": []byte("‾"),
"OverBrace": []byte("⏞"),
"OverBracket": []byte("⎴"),
"OverParenthesis": []byte("⏜"),
"PartialD": []byte("∂"),
"PlusMinus": []byte("±"),
"Poincareplane": []byte("ℌ"),
"Precedes": []byte("≺"),
"PrecedesEqual": []byte("⪯"),
"PrecedesSlantEqual": []byte("≼"),
"PrecedesTilde": []byte("≾"),
"Product": []byte("∏"),
"Proportion": []byte("∷"),
"Proportional": []byte("∝"),
"QUOT": []byte("\""),
"Racute": []byte("Ŕ"),
"Rcaron": []byte("Ř"),
"Rcedil": []byte("Ŗ"),
"ReverseElement": []byte("∋"),
"ReverseEquilibrium": []byte("⇋"),
"ReverseUpEquilibrium": []byte("⥯"),
"Rfr": []byte("ℜ"),
"RightAngleBracket": []byte("〉"),
"RightArrow": []byte("→"),
"RightArrowBar": []byte("⇥"),
"RightArrowLeftArrow": []byte("⇄"),
"RightCeiling": []byte("⌉"),
"RightDoubleBracket": []byte("⟧"),
"RightDownTeeVector": []byte("⥝"),
"RightDownVector": []byte("⇂"),
"RightDownVectorBar": []byte("⥕"),
"RightFloor": []byte("⌋"),
"RightTee": []byte("⊢"),
"RightTeeArrow": []byte("↦"),
"RightTeeVector": []byte("⥛"),
"RightTriangle": []byte("⊳"),
"RightTriangleBar": []byte("⧐"),
"RightTriangleEqual": []byte("⊵"),
"RightUpDownVector": []byte("⥏"),
"RightUpTeeVector": []byte("⥜"),
"RightUpVector": []byte("↾"),
"RightUpVectorBar": []byte("⥔"),
"RightVector": []byte("⇀"),
"RightVectorBar": []byte("⥓"),
"Rightarrow": []byte("⇒"),
"RoundImplies": []byte("⥰"),
"Rrightarrow": []byte("⇛"),
"RuleDelayed": []byte("⧴"),
"SHCHcy": []byte("Щ"),
"SOFTcy": []byte("Ь"),
"Sacute": []byte("Ś"),
"Scaron": []byte("Š"),
"Scedil": []byte("Ş"),
"Scirc": []byte("Ŝ"),
"ShortDownArrow": []byte("↓"),
"ShortLeftArrow": []byte("←"),
"ShortRightArrow": []byte("→"),
"ShortUpArrow": []byte("↑"),
"Sigma": []byte("Σ"),
"SmallCircle": []byte("∘"),
"Square": []byte("□"),
"SquareIntersection": []byte("⊓"),
"SquareSubset": []byte("⊏"),
"SquareSubsetEqual": []byte("⊑"),
"SquareSuperset": []byte("⊐"),
"SquareSupersetEqual": []byte("⊒"),
"SquareUnion": []byte("⊔"),
"Subset": []byte("⋐"),
"SubsetEqual": []byte("⊆"),
"Succeeds": []byte("≻"),
"SucceedsEqual": []byte("⪰"),
"SucceedsSlantEqual": []byte("≽"),
"SucceedsTilde": []byte("≿"),
"SuchThat": []byte("∋"),
"Superset": []byte("⊃"),
"SupersetEqual": []byte("⊇"),
"Supset": []byte("⋑"),
"THORN": []byte("Þ"),
"Tab": []byte(" "),
"Tcaron": []byte("Ť"),
"Tcedil": []byte("Ţ"),
"Therefore": []byte("∴"),
"Theta": []byte("Θ"),
"ThinSpace": []byte(" "),
"Tilde": []byte("∼"),
"TildeEqual": []byte("≃"),
"TildeFullEqual": []byte("≅"),
"TildeTilde": []byte("≈"),
"TripleDot": []byte("⃛"),
"Tstrok": []byte("Ŧ"),
"Uacute": []byte("Ú"),
"Uarrocir": []byte("⥉"),
"Ubreve": []byte("Ŭ"),
"Ucirc": []byte("Û"),
"Udblac": []byte("Ű"),
"Ugrave": []byte("Ù"),
"Umacr": []byte("Ū"),
"UnderBar": []byte("_"),
"UnderBrace": []byte("⏟"),
"UnderBracket": []byte("⎵"),
"UnderParenthesis": []byte("⏝"),
"Union": []byte("⋃"),
"UnionPlus": []byte("⊎"),
"Uogon": []byte("Ų"),
"UpArrow": []byte("↑"),
"UpArrowBar": []byte("⤒"),
"UpArrowDownArrow": []byte("⇅"),
"UpDownArrow": []byte("↕"),
"UpEquilibrium": []byte("⥮"),
"UpTee": []byte("⊥"),
"UpTeeArrow": []byte("↥"),
"Uparrow": []byte("⇑"),
"Updownarrow": []byte("⇕"),
"UpperLeftArrow": []byte("↖"),
"UpperRightArrow": []byte("↗"),
"Upsilon": []byte("Υ"),
"Uring": []byte("Ů"),
"Utilde": []byte("Ũ"),
"Verbar": []byte("‖"),
"VerticalBar": []byte("∣"),
"VerticalLine": []byte("|"),
"VerticalSeparator": []byte("❘"),
"VerticalTilde": []byte("≀"),
"VeryThinSpace": []byte(" "),
"Vvdash": []byte("⊪"),
"Wcirc": []byte("Ŵ"),
"Yacute": []byte("Ý"),
"Ycirc": []byte("Ŷ"),
"Zacute": []byte("Ź"),
"Zcaron": []byte("Ž"),
"ZeroWidthSpace": []byte(""),
"aacute": []byte("á"),
"abreve": []byte("ă"),
"acirc": []byte("â"),
"acute": []byte("´"),
"aelig": []byte("æ"),
"agrave": []byte("à"),
"alefsym": []byte("ℵ"),
"alpha": []byte("α"),
"amacr": []byte("ā"),
"amp": []byte("&"),
"andslope": []byte("⩘"),
"angle": []byte("∠"),
"angmsd": []byte("∡"),
"angmsdaa": []byte("⦨"),
"angmsdab": []byte("⦩"),
"angmsdac": []byte("⦪"),
"angmsdad": []byte("⦫"),
"angmsdae": []byte("⦬"),
"angmsdaf": []byte("⦭"),
"angmsdag": []byte("⦮"),
"angmsdah": []byte("⦯"),
"angrtvb": []byte("⊾"),
"angrtvbd": []byte("⦝"),
"angsph": []byte("∢"),
"angst": []byte("Å"),
"angzarr": []byte("⍼"),
"aogon": []byte("ą"),
"apos": []byte("'"),
"approx": []byte("≈"),
"approxeq": []byte("≊"),
"aring": []byte("å"),
"ast": []byte("*"),
"asymp": []byte("≈"),
"asympeq": []byte("≍"),
"atilde": []byte("ã"),
"awconint": []byte("∳"),
"backcong": []byte("≌"),
"backepsilon": []byte("϶"),
"backprime": []byte("‵"),
"backsim": []byte("∽"),
"backsimeq": []byte("⋍"),
"barvee": []byte("⊽"),
"barwed": []byte("⌅"),
"barwedge": []byte("⌅"),
"bbrktbrk": []byte("⎶"),
"becaus": []byte("∵"),
"because": []byte("∵"),
"bemptyv": []byte("⦰"),
"bernou": []byte("ℬ"),
"between": []byte("≬"),
"bigcap": []byte("⋂"),
"bigcirc": []byte("◯"),
"bigcup": []byte("⋃"),
"bigodot": []byte("⨀"),
"bigoplus": []byte("⨁"),
"bigotimes": []byte("⨂"),
"bigsqcup": []byte("⨆"),
"bigstar": []byte("★"),
"bigtriangledown": []byte("▽"),
"bigtriangleup": []byte("△"),
"biguplus": []byte("⨄"),
"bigvee": []byte("⋁"),
"bigwedge": []byte("⋀"),
"bkarow": []byte("⤍"),
"blacklozenge": []byte("⧫"),
"blacksquare": []byte("▪"),
"blacktriangle": []byte("▴"),
"blacktriangledown": []byte("▾"),
"blacktriangleleft": []byte("◂"),
"blacktriangleright": []byte("▸"),
"bottom": []byte("⊥"),
"bowtie": []byte("⋈"),
"boxminus": []byte("⊟"),
"boxplus": []byte("⊞"),
"boxtimes": []byte("⊠"),
"bprime": []byte("‵"),
"breve": []byte("˘"),
"brvbar": []byte("¦"),
"bsol": []byte("\\"),
"bsolhsub": []byte("⟈"),
"bullet": []byte("•"),
"bumpeq": []byte("≏"),
"cacute": []byte("ć"),
"capbrcup": []byte("⩉"),
"caron": []byte("ˇ"),
"ccaron": []byte("č"),
"ccedil": []byte("ç"),
"ccirc": []byte("ĉ"),
"ccupssm": []byte("⩐"),
"cedil": []byte("¸"),
"cemptyv": []byte("⦲"),
"centerdot": []byte("·"),
"checkmark": []byte("✓"),
"circeq": []byte("≗"),
"circlearrowleft": []byte("↺"),
"circlearrowright": []byte("↻"),
"circledR": []byte("®"),
"circledS": []byte("Ⓢ"),
"circledast": []byte("⊛"),
"circledcirc": []byte("⊚"),
"circleddash": []byte("⊝"),
"cirfnint": []byte("⨐"),
"cirscir": []byte("⧂"),
"clubsuit": []byte("♣"),
"colon": []byte(":"),
"colone": []byte("≔"),
"coloneq": []byte("≔"),
"comma": []byte(","),
"commat": []byte("@"),
"compfn": []byte("∘"),
"complement": []byte("∁"),
"complexes": []byte("ℂ"),
"congdot": []byte("⩭"),
"conint": []byte("∮"),
"coprod": []byte("∐"),
"copysr": []byte("℗"),
"cudarrl": []byte("⤸"),
"cudarrr": []byte("⤵"),
"cularr": []byte("↶"),
"cularrp": []byte("⤽"),
"cupbrcap": []byte("⩈"),
"cupdot": []byte("⊍"),
"curarr": []byte("↷"),
"curarrm": []byte("⤼"),
"curlyeqprec": []byte("⋞"),
"curlyeqsucc": []byte("⋟"),
"curlyvee": []byte("⋎"),
"curlywedge": []byte("⋏"),
"curren": []byte("¤"),
"curvearrowleft": []byte("↶"),
"curvearrowright": []byte("↷"),
"cwconint": []byte("∲"),
"cylcty": []byte("⌭"),
"dagger": []byte("†"),
"daleth": []byte("ℸ"),
"dbkarow": []byte("⤏"),
"dblac": []byte("˝"),
"dcaron": []byte("ď"),
"ddagger": []byte("‡"),
"ddotseq": []byte("⩷"),
"delta": []byte("δ"),
"demptyv": []byte("⦱"),
"diamond": []byte("⋄"),
"diamondsuit": []byte("♦"),
"digamma": []byte("ϝ"),
"divide": []byte("÷"),
"divideontimes": []byte("⋇"),
"divonx": []byte("⋇"),
"dlcorn": []byte("⌞"),
"dlcrop": []byte("⌍"),
"dollar": []byte("$"),
"doteqdot": []byte("≑"),
"dotminus": []byte("∸"),
"dotplus": []byte("∔"),
"dotsquare": []byte("⊡"),
"doublebarwedge": []byte("⌆"),
"downarrow": []byte("↓"),
"downdownarrows": []byte("⇊"),
"downharpoonleft": []byte("⇃"),
"downharpoonright": []byte("⇂"),
"drbkarow": []byte("⤐"),
"drcorn": []byte("⌟"),
"drcrop": []byte("⌌"),
"dstrok": []byte("đ"),
"dwangle": []byte("⦦"),
"dzigrarr": []byte("⟿"),
"eacute": []byte("é"),
"ecaron": []byte("ě"),
"ecirc": []byte("ê"),
"ecolon": []byte("≕"),
"egrave": []byte("è"),
"elinters": []byte("⏧"),
"emacr": []byte("ē"),
"emptyset": []byte("∅"),
"emptyv": []byte("∅"),
"emsp13": []byte(" "),
"emsp14": []byte(" "),
"eogon": []byte("ę"),
"epsilon": []byte("ε"),
"eqcirc": []byte("≖"),
"eqcolon": []byte("≕"),
"eqsim": []byte("≂"),
"eqslantgtr": []byte("⪖"),
"eqslantless": []byte("⪕"),
"equals": []byte("="),
"equest": []byte("≟"),
"equivDD": []byte("⩸"),
"eqvparsl": []byte("⧥"),
"excl": []byte("!"),
"expectation": []byte("ℰ"),
"exponentiale": []byte("ⅇ"),
"fallingdotseq": []byte("≒"),
"female": []byte("♀"),
"forall": []byte("∀"),
"fpartint": []byte("⨍"),
"frac12": []byte("½"),
"frac13": []byte("⅓"),
"frac14": []byte("¼"),
"frac15": []byte("⅕"),
"frac16": []byte("⅙"),
"frac18": []byte("⅛"),
"frac23": []byte("⅔"),
"frac25": []byte("⅖"),
"frac34": []byte("¾"),
"frac35": []byte("⅗"),
"frac38": []byte("⅜"),
"frac45": []byte("⅘"),
"frac56": []byte("⅚"),
"frac58": []byte("⅝"),
"frac78": []byte("⅞"),
"gacute": []byte("ǵ"),
"gamma": []byte("γ"),
"gammad": []byte("ϝ"),
"gbreve": []byte("ğ"),
"gcirc": []byte("ĝ"),
"geq": []byte("≥"),
"geqq": []byte("≧"),
"geqslant": []byte("⩾"),
"gesdoto": []byte("⪂"),
"gesdotol": []byte("⪄"),
"ggg": []byte("⋙"),
"gnapprox": []byte("⪊"),
"gneq": []byte("⪈"),
"gneqq": []byte("≩"),
"grave": []byte("`"),
"gt": []byte(">"),
"gtquest": []byte("⩼"),
"gtrapprox": []byte("⪆"),
"gtrdot": []byte("⋗"),
"gtreqless": []byte("⋛"),
"gtreqqless": []byte("⪌"),
"gtrless": []byte("≷"),
"gtrsim": []byte("≳"),
"hArr": []byte("⇔"),
"hairsp": []byte(" "),
"hamilt": []byte("ℋ"),
"hardcy": []byte("ъ"),
"harrcir": []byte("⥈"),
"hcirc": []byte("ĥ"),
"hearts": []byte("♥"),
"heartsuit": []byte("♥"),
"hellip": []byte("…"),
"hercon": []byte("⊹"),
"hksearow": []byte("⤥"),
"hkswarow": []byte("⤦"),
"homtht": []byte("∻"),
"hookleftarrow": []byte("↩"),
"hookrightarrow": []byte("↪"),
"horbar": []byte("―"),
"hslash": []byte("ℏ"),
"hstrok": []byte("ħ"),
"hybull": []byte("⁃"),
"hyphen": []byte("‐"),
"iacute": []byte("í"),
"icirc": []byte("î"),
"iexcl": []byte("¡"),
"igrave": []byte("ì"),
"iiiint": []byte("⨌"),
"iiint": []byte("∭"),
"ijlig": []byte("ij"),
"imacr": []byte("ī"),
"image": []byte("ℑ"),
"imagline": []byte("ℐ"),
"imagpart": []byte("ℑ"),
"imath": []byte("ı"),
"imped": []byte("Ƶ"),
"incare": []byte("℅"),
"infintie": []byte("⧝"),
"inodot": []byte("ı"),
"intcal": []byte("⊺"),
"integers": []byte("ℤ"),
"intercal": []byte("⊺"),
"intlarhk": []byte("⨗"),
"intprod": []byte("⨼"),
"iogon": []byte("į"),
"iquest": []byte("¿"),
"isin": []byte("∈"),
"isindot": []byte("⋵"),
"isinsv": []byte("⋳"),
"isinv": []byte("∈"),
"itilde": []byte("ĩ"),
"jcirc": []byte("ĵ"),
"jmath": []byte("ȷ"),
"jsercy": []byte("ј"),
"kappa": []byte("κ"),
"kappav": []byte("ϰ"),
"kcedil": []byte("ķ"),
"kgreen": []byte("ĸ"),
"lacute": []byte("ĺ"),
"laemptyv": []byte("⦴"),
"lagran": []byte("ℒ"),
"lambda": []byte("λ"),
"langle": []byte("〈"),
"laquo": []byte("«"),
"larrbfs": []byte("⤟"),
"larrhk": []byte("↩"),
"larrlp": []byte("↫"),
"larrsim": []byte("⥳"),
"larrtl": []byte("↢"),
"lbrace": []byte("{"),
"lbrack": []byte("["),
"lbrksld": []byte("⦏"),
"lbrkslu": []byte("⦍"),
"lcaron": []byte("ľ"),
"lcedil": []byte("ļ"),
"lcub": []byte("{"),
"ldquor": []byte("„"),
"ldrdhar": []byte("⥧"),
"ldrushar": []byte("⥋"),
"leftarrow": []byte("←"),
"leftarrowtail": []byte("↢"),
"leftharpoondown": []byte("↽"),
"leftharpoonup": []byte("↼"),
"leftleftarrows": []byte("⇇"),
"leftrightarrow": []byte("↔"),
"leftrightarrows": []byte("⇆"),
"leftrightharpoons": []byte("⇋"),
"leftrightsquigarrow": []byte("↭"),
"leftthreetimes": []byte("⋋"),
"leq": []byte("≤"),
"leqq": []byte("≦"),
"leqslant": []byte("⩽"),
"lesdoto": []byte("⪁"),
"lesdotor": []byte("⪃"),
"lessapprox": []byte("⪅"),
"lessdot": []byte("⋖"),
"lesseqgtr": []byte("⋚"),
"lesseqqgtr": []byte("⪋"),
"lessgtr": []byte("≶"),
"lesssim": []byte("≲"),
"lfloor": []byte("⌊"),
"llcorner": []byte("⌞"),
"lmidot": []byte("ŀ"),
"lmoust": []byte("⎰"),
"lmoustache": []byte("⎰"),
"lnapprox": []byte("⪉"),
"lneq": []byte("⪇"),
"lneqq": []byte("≨"),
"longleftarrow": []byte("⟵"),
"longleftrightarrow": []byte("⟷"),
"longmapsto": []byte("⟼"),
"longrightarrow": []byte("⟶"),
"looparrowleft": []byte("↫"),
"looparrowright": []byte("↬"),
"lotimes": []byte("⨴"),
"lowast": []byte("∗"),
"lowbar": []byte("_"),
"lozenge": []byte("◊"),
"lpar": []byte("("),
"lrcorner": []byte("⌟"),
"lsaquo": []byte("‹"),
"lsqb": []byte("["),
"lsquor": []byte("‚"),
"lstrok": []byte("ł"),
"lt": []byte("<"),
"lthree": []byte("⋋"),
"ltimes": []byte("⋉"),
"ltquest": []byte("⩻"),
"lurdshar": []byte("⥊"),
"luruhar": []byte("⥦"),
"maltese": []byte("✠"),
"mapsto": []byte("↦"),
"mapstodown": []byte("↧"),
"mapstoleft": []byte("↤"),
"mapstoup": []byte("↥"),
"marker": []byte("▮"),
"measuredangle": []byte("∡"),
"micro": []byte("µ"),
"midast": []byte("*"),
"middot": []byte("·"),
"minusb": []byte("⊟"),
"minusd": []byte("∸"),
"minusdu": []byte("⨪"),
"mnplus": []byte("∓"),
"models": []byte("⊧"),
"mstpos": []byte("∾"),
"multimap": []byte("⊸"),
"nLeftarrow": []byte("⇍"),
"nLeftrightarrow": []byte("⇎"),
"nRightarrow": []byte("⇏"),
"nVDash": []byte("⊯"),
"nVdash": []byte("⊮"),
"nabla": []byte("∇"),
"nacute": []byte("ń"),
"napos": []byte("ʼn"),
"napprox": []byte("≉"),
"natural": []byte("♮"),
"naturals": []byte("ℕ"),
"ncaron": []byte("ň"),
"ncedil": []byte("ņ"),
"nearrow": []byte("↗"),
"nequiv": []byte("≢"),
"nesear": []byte("⤨"),
"nexist": []byte("∄"),
"nexists": []byte("∄"),
"ngeq": []byte("≱"),
"ngtr": []byte("≯"),
"niv": []byte("∋"),
"nleftarrow": []byte("↚"),
"nleftrightarrow": []byte("↮"),
"nleq": []byte("≰"),
"nless": []byte("≮"),
"nltrie": []byte("⋬"),
"notinva": []byte("∉"),
"notinvb": []byte("⋷"),
"notinvc": []byte("⋶"),
"notniva": []byte("∌"),
"notnivb": []byte("⋾"),
"notnivc": []byte("⋽"),
"nparallel": []byte("∦"),
"npolint": []byte("⨔"),
"nprcue": []byte("⋠"),
"nprec": []byte("⊀"),
"nrightarrow": []byte("↛"),
"nrtrie": []byte("⋭"),
"nsccue": []byte("⋡"),
"nshortmid": []byte("∤"),
"nshortparallel": []byte("∦"),
"nsimeq": []byte("≄"),
"nsmid": []byte("∤"),
"nspar": []byte("∦"),
"nsqsube": []byte("⋢"),
"nsqsupe": []byte("⋣"),
"nsubseteq": []byte("⊈"),
"nsucc": []byte("⊁"),
"nsupseteq": []byte("⊉"),
"ntilde": []byte("ñ"),
"ntriangleleft": []byte("⋪"),
"ntrianglelefteq": []byte("⋬"),
"ntriangleright": []byte("⋫"),
"ntrianglerighteq": []byte("⋭"),
"num": []byte("#"),
"numero": []byte("№"),
"nvDash": []byte("⊭"),
"nvdash": []byte("⊬"),
"nvinfin": []byte("⧞"),
"nwarrow": []byte("↖"),
"oacute": []byte("ó"),
"ocirc": []byte("ô"),
"odblac": []byte("ő"),
"oelig": []byte("œ"),
"ograve": []byte("ò"),
"olcross": []byte("⦻"),
"omacr": []byte("ō"),
"omega": []byte("ω"),
"omicron": []byte("ο"),
"ominus": []byte("⊖"),
"order": []byte("ℴ"),
"orderof": []byte("ℴ"),
"origof": []byte("⊶"),
"orslope": []byte("⩗"),
"oslash": []byte("ø"),
"otilde": []byte("õ"),
"otimes": []byte("⊗"),
"otimesas": []byte("⨶"),
"parallel": []byte("∥"),
"percnt": []byte("%"),
"period": []byte("."),
"permil": []byte("‰"),
"perp": []byte("⊥"),
"pertenk": []byte("‱"),
"phmmat": []byte("ℳ"),
"pitchfork": []byte("⋔"),
"planck": []byte("ℏ"),
"planckh": []byte("ℎ"),
"plankv": []byte("ℏ"),
"plus": []byte("+"),
"plusacir": []byte("⨣"),
"pluscir": []byte("⨢"),
"plusdo": []byte("∔"),
"plusmn": []byte("±"),
"plussim": []byte("⨦"),
"plustwo": []byte("⨧"),
"pointint": []byte("⨕"),
"pound": []byte("£"),
"prec": []byte("≺"),
"precapprox": []byte("⪷"),
"preccurlyeq": []byte("≼"),
"preceq": []byte("⪯"),
"precnapprox": []byte("⪹"),
"precneqq": []byte("⪵"),
"precnsim": []byte("⋨"),
"precsim": []byte("≾"),
"primes": []byte("ℙ"),
"prnsim": []byte("⋨"),
"profalar": []byte("⌮"),
"profline": []byte("⌒"),
"profsurf": []byte("⌓"),
"propto": []byte("∝"),
"prurel": []byte("⊰"),
"puncsp": []byte(" "),
"qprime": []byte("⁗"),
"quaternions": []byte("ℍ"),
"quatint": []byte("⨖"),
"quest": []byte("?"),
"questeq": []byte("≟"),
"quot": []byte("\""),
"racute": []byte("ŕ"),
"radic": []byte("√"),
"raemptyv": []byte("⦳"),
"rangle": []byte("〉"),
"raquo": []byte("»"),
"rarrbfs": []byte("⤠"),
"rarrhk": []byte("↪"),
"rarrlp": []byte("↬"),
"rarrsim": []byte("⥴"),
"rarrtl": []byte("↣"),
"rationals": []byte("ℚ"),
"rbrace": []byte("}"),
"rbrack": []byte("]"),
"rbrksld": []byte("⦎"),
"rbrkslu": []byte("⦐"),
"rcaron": []byte("ř"),
"rcedil": []byte("ŗ"),
"rcub": []byte("}"),
"rdldhar": []byte("⥩"),
"rdquor": []byte("”"),
"real": []byte("ℜ"),
"realine": []byte("ℛ"),
"realpart": []byte("ℜ"),
"reals": []byte("ℝ"),
"rfloor": []byte("⌋"),
"rightarrow": []byte("→"),
"rightarrowtail": []byte("↣"),
"rightharpoondown": []byte("⇁"),
"rightharpoonup": []byte("⇀"),
"rightleftarrows": []byte("⇄"),
"rightleftharpoons": []byte("⇌"),
"rightrightarrows": []byte("⇉"),
"rightsquigarrow": []byte("↝"),
"rightthreetimes": []byte("⋌"),
"risingdotseq": []byte("≓"),
"rmoust": []byte("⎱"),
"rmoustache": []byte("⎱"),
"rotimes": []byte("⨵"),
"rpar": []byte(")"),
"rppolint": []byte("⨒"),
"rsaquo": []byte("›"),
"rsqb": []byte("]"),
"rsquor": []byte("’"),
"rthree": []byte("⋌"),
"rtimes": []byte("⋊"),
"rtriltri": []byte("⧎"),
"ruluhar": []byte("⥨"),
"sacute": []byte("ś"),
"scaron": []byte("š"),
"scedil": []byte("ş"),
"scirc": []byte("ŝ"),
"scnsim": []byte("⋩"),
"scpolint": []byte("⨓"),
"searrow": []byte("↘"),
"semi": []byte(";"),
"seswar": []byte("⤩"),
"setminus": []byte("∖"),
"sfrown": []byte("⌢"),
"shchcy": []byte("щ"),
"shortmid": []byte("∣"),
"shortparallel": []byte("∥"),
"sigma": []byte("σ"),
"sigmaf": []byte("ς"),
"sigmav": []byte("ς"),
"simeq": []byte("≃"),
"simplus": []byte("⨤"),
"simrarr": []byte("⥲"),
"slarr": []byte("←"),
"smallsetminus": []byte("∖"),
"smeparsl": []byte("⧤"),
"smid": []byte("∣"),
"softcy": []byte("ь"),
"sol": []byte("/"),
"solbar": []byte("⌿"),
"spades": []byte("♠"),
"spadesuit": []byte("♠"),
"spar": []byte("∥"),
"sqsube": []byte("⊑"),
"sqsubset": []byte("⊏"),
"sqsubseteq": []byte("⊑"),
"sqsupe": []byte("⊒"),
"sqsupset": []byte("⊐"),
"sqsupseteq": []byte("⊒"),
"square": []byte("□"),
"squarf": []byte("▪"),
"srarr": []byte("→"),
"ssetmn": []byte("∖"),
"ssmile": []byte("⌣"),
"sstarf": []byte("⋆"),
"straightepsilon": []byte("ϵ"),
"straightphi": []byte("ϕ"),
"strns": []byte("¯"),
"subedot": []byte("⫃"),
"submult": []byte("⫁"),
"subplus": []byte("⪿"),
"subrarr": []byte("⥹"),
"subset": []byte("⊂"),
"subseteq": []byte("⊆"),
"subseteqq": []byte("⫅"),
"subsetneq": []byte("⊊"),
"subsetneqq": []byte("⫋"),
"succ": []byte("≻"),
"succapprox": []byte("⪸"),
"succcurlyeq": []byte("≽"),
"succeq": []byte("⪰"),
"succnapprox": []byte("⪺"),
"succneqq": []byte("⪶"),
"succnsim": []byte("⋩"),
"succsim": []byte("≿"),
"supdsub": []byte("⫘"),
"supedot": []byte("⫄"),
"suphsol": []byte("⟉"),
"suphsub": []byte("⫗"),
"suplarr": []byte("⥻"),
"supmult": []byte("⫂"),
"supplus": []byte("⫀"),
"supset": []byte("⊃"),
"supseteq": []byte("⊇"),
"supseteqq": []byte("⫆"),
"supsetneq": []byte("⊋"),
"supsetneqq": []byte("⫌"),
"swarrow": []byte("↙"),
"szlig": []byte("ß"),
"target": []byte("⌖"),
"tcaron": []byte("ť"),
"tcedil": []byte("ţ"),
"telrec": []byte("⌕"),
"there4": []byte("∴"),
"therefore": []byte("∴"),
"theta": []byte("θ"),
"thetasym": []byte("ϑ"),
"thetav": []byte("ϑ"),
"thickapprox": []byte("≈"),
"thicksim": []byte("∼"),
"thinsp": []byte(" "),
"thkap": []byte("≈"),
"thksim": []byte("∼"),
"thorn": []byte("þ"),
"tilde": []byte("˜"),
"times": []byte("×"),
"timesb": []byte("⊠"),
"timesbar": []byte("⨱"),
"topbot": []byte("⌶"),
"topfork": []byte("⫚"),
"tprime": []byte("‴"),
"triangle": []byte("▵"),
"triangledown": []byte("▿"),
"triangleleft": []byte("◃"),
"trianglelefteq": []byte("⊴"),
"triangleq": []byte("≜"),
"triangleright": []byte("▹"),
"trianglerighteq": []byte("⊵"),
"tridot": []byte("◬"),
"triminus": []byte("⨺"),
"triplus": []byte("⨹"),
"tritime": []byte("⨻"),
"trpezium": []byte("⏢"),
"tstrok": []byte("ŧ"),
"twoheadleftarrow": []byte("↞"),
"twoheadrightarrow": []byte("↠"),
"uacute": []byte("ú"),
"ubreve": []byte("ŭ"),
"ucirc": []byte("û"),
"udblac": []byte("ű"),
"ugrave": []byte("ù"),
"ulcorn": []byte("⌜"),
"ulcorner": []byte("⌜"),
"ulcrop": []byte("⌏"),
"umacr": []byte("ū"),
"uogon": []byte("ų"),
"uparrow": []byte("↑"),
"updownarrow": []byte("↕"),
"upharpoonleft": []byte("↿"),
"upharpoonright": []byte("↾"),
"upsih": []byte("ϒ"),
"upsilon": []byte("υ"),
"upuparrows": []byte("⇈"),
"urcorn": []byte("⌝"),
"urcorner": []byte("⌝"),
"urcrop": []byte("⌎"),
"uring": []byte("ů"),
"utilde": []byte("ũ"),
"uwangle": []byte("⦧"),
"varepsilon": []byte("ϵ"),
"varkappa": []byte("ϰ"),
"varnothing": []byte("∅"),
"varphi": []byte("ϕ"),
"varpi": []byte("ϖ"),
"varpropto": []byte("∝"),
"varrho": []byte("ϱ"),
"varsigma": []byte("ς"),
"vartheta": []byte("ϑ"),
"vartriangleleft": []byte("⊲"),
"vartriangleright": []byte("⊳"),
"vee": []byte("∨"),
"veebar": []byte("⊻"),
"vellip": []byte("⋮"),
"verbar": []byte("|"),
"vert": []byte("|"),
"vprop": []byte("∝"),
"vzigzag": []byte("⦚"),
"wcirc": []byte("ŵ"),
"wedge": []byte("∧"),
"wedgeq": []byte("≙"),
"weierp": []byte("℘"),
"wreath": []byte("≀"),
"xvee": []byte("⋁"),
"xwedge": []byte("⋀"),
"yacute": []byte("ý"),
"ycirc": []byte("ŷ"),
"zacute": []byte("ź"),
"zcaron": []byte("ž"),
"zeetrf": []byte("ℨ"),
"zigrarr": []byte("⇝"),
}
var TextRevEntitiesMap = map[byte][]byte{
'<': []byte("<"),
}