-
Notifications
You must be signed in to change notification settings - Fork 13
/
html.go
2503 lines (2479 loc) · 131 KB
/
html.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
package main
import (
"fmt"
"html"
)
//下面的注释看不看是可选的!嫌麻烦就可以不看,但是用法是非常简单的!我只是给出一些底层的实现结构
func main() {
//转义与不转义含义:<表达原义,字符串中我怎么写你就怎么存,这就是不转义,但是如果转义的话,则是我怎么写,但是当遇到特殊字符比如<时候会自动将
//我的输入的<号解释成为原生的"<"来表示,则这就是转义了!
// 字符 转义后的字符
// `&`, "&",
// `'`, "'",
// `<`, "<",
// `>`, ">",
// `"`, """,
fmt.Println("--------------html.EscapeString()转义字符串和html.UnescapeString()反转义字符串-------------------")
//// EscapeString escapes special characters like "<" to become "<". It
//// escapes only five such characters: <, >, &, ' and ".
//// UnescapeString(EscapeString(s)) == s always holds, but the converse isn't
//// always true.
//// EscapeString转义特殊字符,如"<"变为"<"。它只转义五个这样的字符:<,>,&,' 和 "。
//// UnescapeString(EscapeString(s))== s总是成立,但相反的情况并非总是如此。
////底层实现:htmlEscaper.Replace(s),关于这个方法的文档如下:
//// Replace返回s的副本,其中包含所有已执行的替换。
//
////var htmlEscaper = strings.NewReplacer(
//// `&`, "&",
//// `'`, "'", // "'" is shorter than "'" and apos was not in HTML until HTML5.//"'"比"'"短,apos直到HTML5才出现在HTML中。
//// `<`, "<",
//// `>`, ">",
//// `"`, """, // """ is shorter than """.//"""比"""短
////)
//
//// Replacer replaces a list of strings with replacements.
//// It is safe for concurrent use by multiple goroutines.
//// Replacer用替换项替换字符串列表。
//// 对于多个goroutine并发使用是安全的。
//type Replacer struct {
// once sync.Once // guards buildOnce method//保护buildOnce方法
// r replacer
// oldnew []string
//}
//
//// replacer is the interface that a replacement algorithm needs to implement.
//// replacer是替换算法需要实现的接口。
//type replacer interface {
// Replace(s string) string
// WriteString(w io.Writer, s string) (n int, err error)
//}
//// genericReplacer is the fully generic algorithm.
//// It's used as a fallback when nothing faster can be used.
//// genericReplacer是完全通用的算法。
////当无法使用更快的速度时,它将用作备用。
//type genericReplacer struct {
// root trieNode
// // tableSize is the size of a trie node's lookup table. It is the number
// // of unique key bytes.
// // tableSize是一个trie节点的查找表的大小。 它是唯一密钥字节的数量。
// tableSize int
// // mapping maps from key bytes to a dense index for trieNode.table.
// //映射从键字节映射到trieNode.table的密集索引。
// mapping [256]byte
//}
// trieNode is a node in a lookup trie for prioritized key/value pairs. Keys
// and values may be empty. For example, the trie containing keys "ax", "ay",
// "bcbc", "x" and "xy" could have eight nodes:
// trieNode是优先级键/值对的查找树中的节点。 键和值可能为空。 例如,包含键“ ax”,“ ay”,“ bcbc”,“ x”和“ xy”的特里可能有八个节点:
//
// n0 -
// n1 a-
// n2 .x+
// n3 .y+
// n4 b-
// n5 .cbc+
// n6 x+
// n7 .y+
//
// n0 is the root node, and its children are n1, n4 and n6; n1's children are
// n2 and n3; n4's child is n5; n6's child is n7. Nodes n0, n1 and n4 (marked
// with a trailing "-") are partial keys, and nodes n2, n3, n5, n6 and n7
// (marked with a trailing "+") are complete keys.
// n0是根节点,其子节点是n1,n4和n6; n1个孩子是n2和n3; n4的孩子是n5; n6的孩子是n7。
// 节点n0,n1和n4(用结尾的“-”标记)是部分密钥,而节点n2,n3,n5,n6和n7(用结尾的“ +”标记)是完整键。
type trieNode struct {
// value is the value of the trie node's key/value pair. It is empty if
// this node is not a complete key.
// value是trie节点的键/值对的值。 如果此节点不是完整key,则为空。
value string
// priority is the priority (higher is more important) of the trie node's
// key/value pair; keys are not necessarily matched shortest- or longest-
// first. Priority is positive if this node is a complete key, and zero
// otherwise. In the example above, positive/zero priorities are marked
// with a trailing "+" or "-".
// 优先级是trie节点的键/值对的优先级(越高,则越重要); 键不一定最短或最长先匹配。
// 如果此节点是完整密钥,则优先级为正,否则为零。 在上面的示例中,正/零优先级用结尾的“ +”或“-”标记。
priority int
// A trie node may have zero, one or more child nodes:
// * if the remaining fields are zero, there are no children.
// * if prefix and next are non-zero, there is one child in next.
// * if table is non-zero, it defines all the children.
//
// Prefixes are preferred over tables when there is one child, but the
// root node always uses a table for lookup efficiency.
// prefix is the difference in keys between this trie node and the next.
// In the example above, node n4 has prefix "cbc" and n4's next node is n5.
// Node n5 has no children and so has zero prefix, next and table fields.
//一个trie节点可能有零个,一个或多个子节点:
// *如果其余字段为零,则没有子级。
// *如果prefix和next不为零,则next中有一个孩子。
// *如果table不为零,则它定义所有子项。
//
//当有一个孩子时,前缀优先于表,但根节点始终使用表来提高查找效率。
//前缀是此Trie节点与下一个节点之间的键差。
//在上面的示例中,节点n4的前缀为“ cbc”,n4的下一个节点为n5。
//节点n5没有子节点,因此前缀,next和table字段为零。
prefix string
next *trieNode
// table is a lookup table indexed by the next byte in the key, after
// remapping that byte through genericReplacer.mapping to create a dense
// index. In the example above, the keys only use 'a', 'b', 'c', 'x' and
// 'y', which remap to 0, 1, 2, 3 and 4. All other bytes remap to 5, and
// genericReplacer.tableSize will be 5. Node n0's table will be
// []*trieNode{ 0:n1, 1:n4, 3:n6 }, where the 0, 1 and 3 are the remapped
// 'a', 'b' and 'x'.
// table是一个查找表,该索引由key中的下一个字节索引,然后通过genericReplacer.mapping重新映射该字节以创建密集索引。 在上面的示例中,键仅使用“ a”,“ b”,“ c”,“ x”和“ y”,它们重新映射为0、1、2、3和4。所有其他字节重新映射为5和genericReplacer .tableSize将为5。
// 节点n0的表将为[] * trieNode {0:n1,1:n4,3:n6},其中0、1和3是重新映射的'a','b'和'x' 。
table []*trieNode
}
oldStr:=`<!DOCTYPE html>
<html>
<body>
<form action="/demo/demo_form.asp">
<select name="cars">
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="fiat">Fiat</option>
<option value="audi">Audi</option>
</select>
<br><br>
<input type="submit">
</form>
</body>
</html>`
newStr:=html.EscapeString(oldStr)
fmt.Println(newStr)
//// UnescapeString unescapes entities like "<" to become "<". It unescapes a
//// larger range of entities than EscapeString escapes. For example, "á"
//// unescapes to "á", as does "á" and "á".
//// UnescapeString(EscapeString(s)) == s always holds, but the converse isn't
//// always true.
//// UnescapeString将像"<"这样的实体entity对象转义为“<”。它能反转义比EscapeString转义的特殊字符数量范围更大的字符。
//// 例如,"á"反转义为"á","á" 和 "á"也能被反转义!
//// UnescapeString(EscapeString(s))==s始终有效,但反之并不总是正确的。
//// 上面的实体entity包括以下:
//// populateMaps populates entity and entity2.
//func populateMaps() {
// entity = map[string]rune{
// "AElig;": '\U000000C6',
// "AMP;": '\U00000026',
// "Aacute;": '\U000000C1',
// "Abreve;": '\U00000102',
// "Acirc;": '\U000000C2',
// "Acy;": '\U00000410',
// "Afr;": '\U0001D504',
// "Agrave;": '\U000000C0',
// "Alpha;": '\U00000391',
// "Amacr;": '\U00000100',
// "And;": '\U00002A53',
// "Aogon;": '\U00000104',
// "Aopf;": '\U0001D538',
// "ApplyFunction;": '\U00002061',
// "Aring;": '\U000000C5',
// "Ascr;": '\U0001D49C',
// "Assign;": '\U00002254',
// "Atilde;": '\U000000C3',
// "Auml;": '\U000000C4',
// "Backslash;": '\U00002216',
// "Barv;": '\U00002AE7',
// "Barwed;": '\U00002306',
// "Bcy;": '\U00000411',
// "Because;": '\U00002235',
// "Bernoullis;": '\U0000212C',
// "Beta;": '\U00000392',
// "Bfr;": '\U0001D505',
// "Bopf;": '\U0001D539',
// "Breve;": '\U000002D8',
// "Bscr;": '\U0000212C',
// "Bumpeq;": '\U0000224E',
// "CHcy;": '\U00000427',
// "COPY;": '\U000000A9',
// "Cacute;": '\U00000106',
// "Cap;": '\U000022D2',
// "CapitalDifferentialD;": '\U00002145',
// "Cayleys;": '\U0000212D',
// "Ccaron;": '\U0000010C',
// "Ccedil;": '\U000000C7',
// "Ccirc;": '\U00000108',
// "Cconint;": '\U00002230',
// "Cdot;": '\U0000010A',
// "Cedilla;": '\U000000B8',
// "CenterDot;": '\U000000B7',
// "Cfr;": '\U0000212D',
// "Chi;": '\U000003A7',
// "CircleDot;": '\U00002299',
// "CircleMinus;": '\U00002296',
// "CirclePlus;": '\U00002295',
// "CircleTimes;": '\U00002297',
// "ClockwiseContourIntegral;": '\U00002232',
// "CloseCurlyDoubleQuote;": '\U0000201D',
// "CloseCurlyQuote;": '\U00002019',
// "Colon;": '\U00002237',
// "Colone;": '\U00002A74',
// "Congruent;": '\U00002261',
// "Conint;": '\U0000222F',
// "ContourIntegral;": '\U0000222E',
// "Copf;": '\U00002102',
// "Coproduct;": '\U00002210',
// "CounterClockwiseContourIntegral;": '\U00002233',
// "Cross;": '\U00002A2F',
// "Cscr;": '\U0001D49E',
// "Cup;": '\U000022D3',
// "CupCap;": '\U0000224D',
// "DD;": '\U00002145',
// "DDotrahd;": '\U00002911',
// "DJcy;": '\U00000402',
// "DScy;": '\U00000405',
// "DZcy;": '\U0000040F',
// "Dagger;": '\U00002021',
// "Darr;": '\U000021A1',
// "Dashv;": '\U00002AE4',
// "Dcaron;": '\U0000010E',
// "Dcy;": '\U00000414',
// "Del;": '\U00002207',
// "Delta;": '\U00000394',
// "Dfr;": '\U0001D507',
// "DiacriticalAcute;": '\U000000B4',
// "DiacriticalDot;": '\U000002D9',
// "DiacriticalDoubleAcute;": '\U000002DD',
// "DiacriticalGrave;": '\U00000060',
// "DiacriticalTilde;": '\U000002DC',
// "Diamond;": '\U000022C4',
// "DifferentialD;": '\U00002146',
// "Dopf;": '\U0001D53B',
// "Dot;": '\U000000A8',
// "DotDot;": '\U000020DC',
// "DotEqual;": '\U00002250',
// "DoubleContourIntegral;": '\U0000222F',
// "DoubleDot;": '\U000000A8',
// "DoubleDownArrow;": '\U000021D3',
// "DoubleLeftArrow;": '\U000021D0',
// "DoubleLeftRightArrow;": '\U000021D4',
// "DoubleLeftTee;": '\U00002AE4',
// "DoubleLongLeftArrow;": '\U000027F8',
// "DoubleLongLeftRightArrow;": '\U000027FA',
// "DoubleLongRightArrow;": '\U000027F9',
// "DoubleRightArrow;": '\U000021D2',
// "DoubleRightTee;": '\U000022A8',
// "DoubleUpArrow;": '\U000021D1',
// "DoubleUpDownArrow;": '\U000021D5',
// "DoubleVerticalBar;": '\U00002225',
// "DownArrow;": '\U00002193',
// "DownArrowBar;": '\U00002913',
// "DownArrowUpArrow;": '\U000021F5',
// "DownBreve;": '\U00000311',
// "DownLeftRightVector;": '\U00002950',
// "DownLeftTeeVector;": '\U0000295E',
// "DownLeftVector;": '\U000021BD',
// "DownLeftVectorBar;": '\U00002956',
// "DownRightTeeVector;": '\U0000295F',
// "DownRightVector;": '\U000021C1',
// "DownRightVectorBar;": '\U00002957',
// "DownTee;": '\U000022A4',
// "DownTeeArrow;": '\U000021A7',
// "Downarrow;": '\U000021D3',
// "Dscr;": '\U0001D49F',
// "Dstrok;": '\U00000110',
// "ENG;": '\U0000014A',
// "ETH;": '\U000000D0',
// "Eacute;": '\U000000C9',
// "Ecaron;": '\U0000011A',
// "Ecirc;": '\U000000CA',
// "Ecy;": '\U0000042D',
// "Edot;": '\U00000116',
// "Efr;": '\U0001D508',
// "Egrave;": '\U000000C8',
// "Element;": '\U00002208',
// "Emacr;": '\U00000112',
// "EmptySmallSquare;": '\U000025FB',
// "EmptyVerySmallSquare;": '\U000025AB',
// "Eogon;": '\U00000118',
// "Eopf;": '\U0001D53C',
// "Epsilon;": '\U00000395',
// "Equal;": '\U00002A75',
// "EqualTilde;": '\U00002242',
// "Equilibrium;": '\U000021CC',
// "Escr;": '\U00002130',
// "Esim;": '\U00002A73',
// "Eta;": '\U00000397',
// "Euml;": '\U000000CB',
// "Exists;": '\U00002203',
// "ExponentialE;": '\U00002147',
// "Fcy;": '\U00000424',
// "Ffr;": '\U0001D509',
// "FilledSmallSquare;": '\U000025FC',
// "FilledVerySmallSquare;": '\U000025AA',
// "Fopf;": '\U0001D53D',
// "ForAll;": '\U00002200',
// "Fouriertrf;": '\U00002131',
// "Fscr;": '\U00002131',
// "GJcy;": '\U00000403',
// "GT;": '\U0000003E',
// "Gamma;": '\U00000393',
// "Gammad;": '\U000003DC',
// "Gbreve;": '\U0000011E',
// "Gcedil;": '\U00000122',
// "Gcirc;": '\U0000011C',
// "Gcy;": '\U00000413',
// "Gdot;": '\U00000120',
// "Gfr;": '\U0001D50A',
// "Gg;": '\U000022D9',
// "Gopf;": '\U0001D53E',
// "GreaterEqual;": '\U00002265',
// "GreaterEqualLess;": '\U000022DB',
// "GreaterFullEqual;": '\U00002267',
// "GreaterGreater;": '\U00002AA2',
// "GreaterLess;": '\U00002277',
// "GreaterSlantEqual;": '\U00002A7E',
// "GreaterTilde;": '\U00002273',
// "Gscr;": '\U0001D4A2',
// "Gt;": '\U0000226B',
// "HARDcy;": '\U0000042A',
// "Hacek;": '\U000002C7',
// "Hat;": '\U0000005E',
// "Hcirc;": '\U00000124',
// "Hfr;": '\U0000210C',
// "HilbertSpace;": '\U0000210B',
// "Hopf;": '\U0000210D',
// "HorizontalLine;": '\U00002500',
// "Hscr;": '\U0000210B',
// "Hstrok;": '\U00000126',
// "HumpDownHump;": '\U0000224E',
// "HumpEqual;": '\U0000224F',
// "IEcy;": '\U00000415',
// "IJlig;": '\U00000132',
// "IOcy;": '\U00000401',
// "Iacute;": '\U000000CD',
// "Icirc;": '\U000000CE',
// "Icy;": '\U00000418',
// "Idot;": '\U00000130',
// "Ifr;": '\U00002111',
// "Igrave;": '\U000000CC',
// "Im;": '\U00002111',
// "Imacr;": '\U0000012A',
// "ImaginaryI;": '\U00002148',
// "Implies;": '\U000021D2',
// "Int;": '\U0000222C',
// "Integral;": '\U0000222B',
// "Intersection;": '\U000022C2',
// "InvisibleComma;": '\U00002063',
// "InvisibleTimes;": '\U00002062',
// "Iogon;": '\U0000012E',
// "Iopf;": '\U0001D540',
// "Iota;": '\U00000399',
// "Iscr;": '\U00002110',
// "Itilde;": '\U00000128',
// "Iukcy;": '\U00000406',
// "Iuml;": '\U000000CF',
// "Jcirc;": '\U00000134',
// "Jcy;": '\U00000419',
// "Jfr;": '\U0001D50D',
// "Jopf;": '\U0001D541',
// "Jscr;": '\U0001D4A5',
// "Jsercy;": '\U00000408',
// "Jukcy;": '\U00000404',
// "KHcy;": '\U00000425',
// "KJcy;": '\U0000040C',
// "Kappa;": '\U0000039A',
// "Kcedil;": '\U00000136',
// "Kcy;": '\U0000041A',
// "Kfr;": '\U0001D50E',
// "Kopf;": '\U0001D542',
// "Kscr;": '\U0001D4A6',
// "LJcy;": '\U00000409',
// "LT;": '\U0000003C',
// "Lacute;": '\U00000139',
// "Lambda;": '\U0000039B',
// "Lang;": '\U000027EA',
// "Laplacetrf;": '\U00002112',
// "Larr;": '\U0000219E',
// "Lcaron;": '\U0000013D',
// "Lcedil;": '\U0000013B',
// "Lcy;": '\U0000041B',
// "LeftAngleBracket;": '\U000027E8',
// "LeftArrow;": '\U00002190',
// "LeftArrowBar;": '\U000021E4',
// "LeftArrowRightArrow;": '\U000021C6',
// "LeftCeiling;": '\U00002308',
// "LeftDoubleBracket;": '\U000027E6',
// "LeftDownTeeVector;": '\U00002961',
// "LeftDownVector;": '\U000021C3',
// "LeftDownVectorBar;": '\U00002959',
// "LeftFloor;": '\U0000230A',
// "LeftRightArrow;": '\U00002194',
// "LeftRightVector;": '\U0000294E',
// "LeftTee;": '\U000022A3',
// "LeftTeeArrow;": '\U000021A4',
// "LeftTeeVector;": '\U0000295A',
// "LeftTriangle;": '\U000022B2',
// "LeftTriangleBar;": '\U000029CF',
// "LeftTriangleEqual;": '\U000022B4',
// "LeftUpDownVector;": '\U00002951',
// "LeftUpTeeVector;": '\U00002960',
// "LeftUpVector;": '\U000021BF',
// "LeftUpVectorBar;": '\U00002958',
// "LeftVector;": '\U000021BC',
// "LeftVectorBar;": '\U00002952',
// "Leftarrow;": '\U000021D0',
// "Leftrightarrow;": '\U000021D4',
// "LessEqualGreater;": '\U000022DA',
// "LessFullEqual;": '\U00002266',
// "LessGreater;": '\U00002276',
// "LessLess;": '\U00002AA1',
// "LessSlantEqual;": '\U00002A7D',
// "LessTilde;": '\U00002272',
// "Lfr;": '\U0001D50F',
// "Ll;": '\U000022D8',
// "Lleftarrow;": '\U000021DA',
// "Lmidot;": '\U0000013F',
// "LongLeftArrow;": '\U000027F5',
// "LongLeftRightArrow;": '\U000027F7',
// "LongRightArrow;": '\U000027F6',
// "Longleftarrow;": '\U000027F8',
// "Longleftrightarrow;": '\U000027FA',
// "Longrightarrow;": '\U000027F9',
// "Lopf;": '\U0001D543',
// "LowerLeftArrow;": '\U00002199',
// "LowerRightArrow;": '\U00002198',
// "Lscr;": '\U00002112',
// "Lsh;": '\U000021B0',
// "Lstrok;": '\U00000141',
// "Lt;": '\U0000226A',
// "Map;": '\U00002905',
// "Mcy;": '\U0000041C',
// "MediumSpace;": '\U0000205F',
// "Mellintrf;": '\U00002133',
// "Mfr;": '\U0001D510',
// "MinusPlus;": '\U00002213',
// "Mopf;": '\U0001D544',
// "Mscr;": '\U00002133',
// "Mu;": '\U0000039C',
// "NJcy;": '\U0000040A',
// "Nacute;": '\U00000143',
// "Ncaron;": '\U00000147',
// "Ncedil;": '\U00000145',
// "Ncy;": '\U0000041D',
// "NegativeMediumSpace;": '\U0000200B',
// "NegativeThickSpace;": '\U0000200B',
// "NegativeThinSpace;": '\U0000200B',
// "NegativeVeryThinSpace;": '\U0000200B',
// "NestedGreaterGreater;": '\U0000226B',
// "NestedLessLess;": '\U0000226A',
// "NewLine;": '\U0000000A',
// "Nfr;": '\U0001D511',
// "NoBreak;": '\U00002060',
// "NonBreakingSpace;": '\U000000A0',
// "Nopf;": '\U00002115',
// "Not;": '\U00002AEC',
// "NotCongruent;": '\U00002262',
// "NotCupCap;": '\U0000226D',
// "NotDoubleVerticalBar;": '\U00002226',
// "NotElement;": '\U00002209',
// "NotEqual;": '\U00002260',
// "NotExists;": '\U00002204',
// "NotGreater;": '\U0000226F',
// "NotGreaterEqual;": '\U00002271',
// "NotGreaterLess;": '\U00002279',
// "NotGreaterTilde;": '\U00002275',
// "NotLeftTriangle;": '\U000022EA',
// "NotLeftTriangleEqual;": '\U000022EC',
// "NotLess;": '\U0000226E',
// "NotLessEqual;": '\U00002270',
// "NotLessGreater;": '\U00002278',
// "NotLessTilde;": '\U00002274',
// "NotPrecedes;": '\U00002280',
// "NotPrecedesSlantEqual;": '\U000022E0',
// "NotReverseElement;": '\U0000220C',
// "NotRightTriangle;": '\U000022EB',
// "NotRightTriangleEqual;": '\U000022ED',
// "NotSquareSubsetEqual;": '\U000022E2',
// "NotSquareSupersetEqual;": '\U000022E3',
// "NotSubsetEqual;": '\U00002288',
// "NotSucceeds;": '\U00002281',
// "NotSucceedsSlantEqual;": '\U000022E1',
// "NotSupersetEqual;": '\U00002289',
// "NotTilde;": '\U00002241',
// "NotTildeEqual;": '\U00002244',
// "NotTildeFullEqual;": '\U00002247',
// "NotTildeTilde;": '\U00002249',
// "NotVerticalBar;": '\U00002224',
// "Nscr;": '\U0001D4A9',
// "Ntilde;": '\U000000D1',
// "Nu;": '\U0000039D',
// "OElig;": '\U00000152',
// "Oacute;": '\U000000D3',
// "Ocirc;": '\U000000D4',
// "Ocy;": '\U0000041E',
// "Odblac;": '\U00000150',
// "Ofr;": '\U0001D512',
// "Ograve;": '\U000000D2',
// "Omacr;": '\U0000014C',
// "Omega;": '\U000003A9',
// "Omicron;": '\U0000039F',
// "Oopf;": '\U0001D546',
// "OpenCurlyDoubleQuote;": '\U0000201C',
// "OpenCurlyQuote;": '\U00002018',
// "Or;": '\U00002A54',
// "Oscr;": '\U0001D4AA',
// "Oslash;": '\U000000D8',
// "Otilde;": '\U000000D5',
// "Otimes;": '\U00002A37',
// "Ouml;": '\U000000D6',
// "OverBar;": '\U0000203E',
// "OverBrace;": '\U000023DE',
// "OverBracket;": '\U000023B4',
// "OverParenthesis;": '\U000023DC',
// "PartialD;": '\U00002202',
// "Pcy;": '\U0000041F',
// "Pfr;": '\U0001D513',
// "Phi;": '\U000003A6',
// "Pi;": '\U000003A0',
// "PlusMinus;": '\U000000B1',
// "Poincareplane;": '\U0000210C',
// "Popf;": '\U00002119',
// "Pr;": '\U00002ABB',
// "Precedes;": '\U0000227A',
// "PrecedesEqual;": '\U00002AAF',
// "PrecedesSlantEqual;": '\U0000227C',
// "PrecedesTilde;": '\U0000227E',
// "Prime;": '\U00002033',
// "Product;": '\U0000220F',
// "Proportion;": '\U00002237',
// "Proportional;": '\U0000221D',
// "Pscr;": '\U0001D4AB',
// "Psi;": '\U000003A8',
// "QUOT;": '\U00000022',
// "Qfr;": '\U0001D514',
// "Qopf;": '\U0000211A',
// "Qscr;": '\U0001D4AC',
// "RBarr;": '\U00002910',
// "REG;": '\U000000AE',
// "Racute;": '\U00000154',
// "Rang;": '\U000027EB',
// "Rarr;": '\U000021A0',
// "Rarrtl;": '\U00002916',
// "Rcaron;": '\U00000158',
// "Rcedil;": '\U00000156',
// "Rcy;": '\U00000420',
// "Re;": '\U0000211C',
// "ReverseElement;": '\U0000220B',
// "ReverseEquilibrium;": '\U000021CB',
// "ReverseUpEquilibrium;": '\U0000296F',
// "Rfr;": '\U0000211C',
// "Rho;": '\U000003A1',
// "RightAngleBracket;": '\U000027E9',
// "RightArrow;": '\U00002192',
// "RightArrowBar;": '\U000021E5',
// "RightArrowLeftArrow;": '\U000021C4',
// "RightCeiling;": '\U00002309',
// "RightDoubleBracket;": '\U000027E7',
// "RightDownTeeVector;": '\U0000295D',
// "RightDownVector;": '\U000021C2',
// "RightDownVectorBar;": '\U00002955',
// "RightFloor;": '\U0000230B',
// "RightTee;": '\U000022A2',
// "RightTeeArrow;": '\U000021A6',
// "RightTeeVector;": '\U0000295B',
// "RightTriangle;": '\U000022B3',
// "RightTriangleBar;": '\U000029D0',
// "RightTriangleEqual;": '\U000022B5',
// "RightUpDownVector;": '\U0000294F',
// "RightUpTeeVector;": '\U0000295C',
// "RightUpVector;": '\U000021BE',
// "RightUpVectorBar;": '\U00002954',
// "RightVector;": '\U000021C0',
// "RightVectorBar;": '\U00002953',
// "Rightarrow;": '\U000021D2',
// "Ropf;": '\U0000211D',
// "RoundImplies;": '\U00002970',
// "Rrightarrow;": '\U000021DB',
// "Rscr;": '\U0000211B',
// "Rsh;": '\U000021B1',
// "RuleDelayed;": '\U000029F4',
// "SHCHcy;": '\U00000429',
// "SHcy;": '\U00000428',
// "SOFTcy;": '\U0000042C',
// "Sacute;": '\U0000015A',
// "Sc;": '\U00002ABC',
// "Scaron;": '\U00000160',
// "Scedil;": '\U0000015E',
// "Scirc;": '\U0000015C',
// "Scy;": '\U00000421',
// "Sfr;": '\U0001D516',
// "ShortDownArrow;": '\U00002193',
// "ShortLeftArrow;": '\U00002190',
// "ShortRightArrow;": '\U00002192',
// "ShortUpArrow;": '\U00002191',
// "Sigma;": '\U000003A3',
// "SmallCircle;": '\U00002218',
// "Sopf;": '\U0001D54A',
// "Sqrt;": '\U0000221A',
// "Square;": '\U000025A1',
// "SquareIntersection;": '\U00002293',
// "SquareSubset;": '\U0000228F',
// "SquareSubsetEqual;": '\U00002291',
// "SquareSuperset;": '\U00002290',
// "SquareSupersetEqual;": '\U00002292',
// "SquareUnion;": '\U00002294',
// "Sscr;": '\U0001D4AE',
// "Star;": '\U000022C6',
// "Sub;": '\U000022D0',
// "Subset;": '\U000022D0',
// "SubsetEqual;": '\U00002286',
// "Succeeds;": '\U0000227B',
// "SucceedsEqual;": '\U00002AB0',
// "SucceedsSlantEqual;": '\U0000227D',
// "SucceedsTilde;": '\U0000227F',
// "SuchThat;": '\U0000220B',
// "Sum;": '\U00002211',
// "Sup;": '\U000022D1',
// "Superset;": '\U00002283',
// "SupersetEqual;": '\U00002287',
// "Supset;": '\U000022D1',
// "THORN;": '\U000000DE',
// "TRADE;": '\U00002122',
// "TSHcy;": '\U0000040B',
// "TScy;": '\U00000426',
// "Tab;": '\U00000009',
// "Tau;": '\U000003A4',
// "Tcaron;": '\U00000164',
// "Tcedil;": '\U00000162',
// "Tcy;": '\U00000422',
// "Tfr;": '\U0001D517',
// "Therefore;": '\U00002234',
// "Theta;": '\U00000398',
// "ThinSpace;": '\U00002009',
// "Tilde;": '\U0000223C',
// "TildeEqual;": '\U00002243',
// "TildeFullEqual;": '\U00002245',
// "TildeTilde;": '\U00002248',
// "Topf;": '\U0001D54B',
// "TripleDot;": '\U000020DB',
// "Tscr;": '\U0001D4AF',
// "Tstrok;": '\U00000166',
// "Uacute;": '\U000000DA',
// "Uarr;": '\U0000219F',
// "Uarrocir;": '\U00002949',
// "Ubrcy;": '\U0000040E',
// "Ubreve;": '\U0000016C',
// "Ucirc;": '\U000000DB',
// "Ucy;": '\U00000423',
// "Udblac;": '\U00000170',
// "Ufr;": '\U0001D518',
// "Ugrave;": '\U000000D9',
// "Umacr;": '\U0000016A',
// "UnderBar;": '\U0000005F',
// "UnderBrace;": '\U000023DF',
// "UnderBracket;": '\U000023B5',
// "UnderParenthesis;": '\U000023DD',
// "Union;": '\U000022C3',
// "UnionPlus;": '\U0000228E',
// "Uogon;": '\U00000172',
// "Uopf;": '\U0001D54C',
// "UpArrow;": '\U00002191',
// "UpArrowBar;": '\U00002912',
// "UpArrowDownArrow;": '\U000021C5',
// "UpDownArrow;": '\U00002195',
// "UpEquilibrium;": '\U0000296E',
// "UpTee;": '\U000022A5',
// "UpTeeArrow;": '\U000021A5',
// "Uparrow;": '\U000021D1',
// "Updownarrow;": '\U000021D5',
// "UpperLeftArrow;": '\U00002196',
// "UpperRightArrow;": '\U00002197',
// "Upsi;": '\U000003D2',
// "Upsilon;": '\U000003A5',
// "Uring;": '\U0000016E',
// "Uscr;": '\U0001D4B0',
// "Utilde;": '\U00000168',
// "Uuml;": '\U000000DC',
// "VDash;": '\U000022AB',
// "Vbar;": '\U00002AEB',
// "Vcy;": '\U00000412',
// "Vdash;": '\U000022A9',
// "Vdashl;": '\U00002AE6',
// "Vee;": '\U000022C1',
// "Verbar;": '\U00002016',
// "Vert;": '\U00002016',
// "VerticalBar;": '\U00002223',
// "VerticalLine;": '\U0000007C',
// "VerticalSeparator;": '\U00002758',
// "VerticalTilde;": '\U00002240',
// "VeryThinSpace;": '\U0000200A',
// "Vfr;": '\U0001D519',
// "Vopf;": '\U0001D54D',
// "Vscr;": '\U0001D4B1',
// "Vvdash;": '\U000022AA',
// "Wcirc;": '\U00000174',
// "Wedge;": '\U000022C0',
// "Wfr;": '\U0001D51A',
// "Wopf;": '\U0001D54E',
// "Wscr;": '\U0001D4B2',
// "Xfr;": '\U0001D51B',
// "Xi;": '\U0000039E',
// "Xopf;": '\U0001D54F',
// "Xscr;": '\U0001D4B3',
// "YAcy;": '\U0000042F',
// "YIcy;": '\U00000407',
// "YUcy;": '\U0000042E',
// "Yacute;": '\U000000DD',
// "Ycirc;": '\U00000176',
// "Ycy;": '\U0000042B',
// "Yfr;": '\U0001D51C',
// "Yopf;": '\U0001D550',
// "Yscr;": '\U0001D4B4',
// "Yuml;": '\U00000178',
// "ZHcy;": '\U00000416',
// "Zacute;": '\U00000179',
// "Zcaron;": '\U0000017D',
// "Zcy;": '\U00000417',
// "Zdot;": '\U0000017B',
// "ZeroWidthSpace;": '\U0000200B',
// "Zeta;": '\U00000396',
// "Zfr;": '\U00002128',
// "Zopf;": '\U00002124',
// "Zscr;": '\U0001D4B5',
// "aacute;": '\U000000E1',
// "abreve;": '\U00000103',
// "ac;": '\U0000223E',
// "acd;": '\U0000223F',
// "acirc;": '\U000000E2',
// "acute;": '\U000000B4',
// "acy;": '\U00000430',
// "aelig;": '\U000000E6',
// "af;": '\U00002061',
// "afr;": '\U0001D51E',
// "agrave;": '\U000000E0',
// "alefsym;": '\U00002135',
// "aleph;": '\U00002135',
// "alpha;": '\U000003B1',
// "amacr;": '\U00000101',
// "amalg;": '\U00002A3F',
// "amp;": '\U00000026',
// "and;": '\U00002227',
// "andand;": '\U00002A55',
// "andd;": '\U00002A5C',
// "andslope;": '\U00002A58',
// "andv;": '\U00002A5A',
// "ang;": '\U00002220',
// "ange;": '\U000029A4',
// "angle;": '\U00002220',
// "angmsd;": '\U00002221',
// "angmsdaa;": '\U000029A8',
// "angmsdab;": '\U000029A9',
// "angmsdac;": '\U000029AA',
// "angmsdad;": '\U000029AB',
// "angmsdae;": '\U000029AC',
// "angmsdaf;": '\U000029AD',
// "angmsdag;": '\U000029AE',
// "angmsdah;": '\U000029AF',
// "angrt;": '\U0000221F',
// "angrtvb;": '\U000022BE',
// "angrtvbd;": '\U0000299D',
// "angsph;": '\U00002222',
// "angst;": '\U000000C5',
// "angzarr;": '\U0000237C',
// "aogon;": '\U00000105',
// "aopf;": '\U0001D552',
// "ap;": '\U00002248',
// "apE;": '\U00002A70',
// "apacir;": '\U00002A6F',
// "ape;": '\U0000224A',
// "apid;": '\U0000224B',
// "apos;": '\U00000027',
// "approx;": '\U00002248',
// "approxeq;": '\U0000224A',
// "aring;": '\U000000E5',
// "ascr;": '\U0001D4B6',
// "ast;": '\U0000002A',
// "asymp;": '\U00002248',
// "asympeq;": '\U0000224D',
// "atilde;": '\U000000E3',
// "auml;": '\U000000E4',
// "awconint;": '\U00002233',
// "awint;": '\U00002A11',
// "bNot;": '\U00002AED',
// "backcong;": '\U0000224C',
// "backepsilon;": '\U000003F6',
// "backprime;": '\U00002035',
// "backsim;": '\U0000223D',
// "backsimeq;": '\U000022CD',
// "barvee;": '\U000022BD',
// "barwed;": '\U00002305',
// "barwedge;": '\U00002305',
// "bbrk;": '\U000023B5',
// "bbrktbrk;": '\U000023B6',
// "bcong;": '\U0000224C',
// "bcy;": '\U00000431',
// "bdquo;": '\U0000201E',
// "becaus;": '\U00002235',
// "because;": '\U00002235',
// "bemptyv;": '\U000029B0',
// "bepsi;": '\U000003F6',
// "bernou;": '\U0000212C',
// "beta;": '\U000003B2',
// "beth;": '\U00002136',
// "between;": '\U0000226C',
// "bfr;": '\U0001D51F',
// "bigcap;": '\U000022C2',
// "bigcirc;": '\U000025EF',
// "bigcup;": '\U000022C3',
// "bigodot;": '\U00002A00',
// "bigoplus;": '\U00002A01',
// "bigotimes;": '\U00002A02',
// "bigsqcup;": '\U00002A06',
// "bigstar;": '\U00002605',
// "bigtriangledown;": '\U000025BD',
// "bigtriangleup;": '\U000025B3',
// "biguplus;": '\U00002A04',
// "bigvee;": '\U000022C1',
// "bigwedge;": '\U000022C0',
// "bkarow;": '\U0000290D',
// "blacklozenge;": '\U000029EB',
// "blacksquare;": '\U000025AA',
// "blacktriangle;": '\U000025B4',
// "blacktriangledown;": '\U000025BE',
// "blacktriangleleft;": '\U000025C2',
// "blacktriangleright;": '\U000025B8',
// "blank;": '\U00002423',
// "blk12;": '\U00002592',
// "blk14;": '\U00002591',
// "blk34;": '\U00002593',
// "block;": '\U00002588',
// "bnot;": '\U00002310',
// "bopf;": '\U0001D553',
// "bot;": '\U000022A5',
// "bottom;": '\U000022A5',
// "bowtie;": '\U000022C8',
// "boxDL;": '\U00002557',
// "boxDR;": '\U00002554',
// "boxDl;": '\U00002556',
// "boxDr;": '\U00002553',
// "boxH;": '\U00002550',
// "boxHD;": '\U00002566',
// "boxHU;": '\U00002569',
// "boxHd;": '\U00002564',
// "boxHu;": '\U00002567',
// "boxUL;": '\U0000255D',
// "boxUR;": '\U0000255A',
// "boxUl;": '\U0000255C',
// "boxUr;": '\U00002559',
// "boxV;": '\U00002551',
// "boxVH;": '\U0000256C',
// "boxVL;": '\U00002563',
// "boxVR;": '\U00002560',
// "boxVh;": '\U0000256B',
// "boxVl;": '\U00002562',
// "boxVr;": '\U0000255F',
// "boxbox;": '\U000029C9',
// "boxdL;": '\U00002555',
// "boxdR;": '\U00002552',
// "boxdl;": '\U00002510',
// "boxdr;": '\U0000250C',
// "boxh;": '\U00002500',
// "boxhD;": '\U00002565',
// "boxhU;": '\U00002568',
// "boxhd;": '\U0000252C',
// "boxhu;": '\U00002534',
// "boxminus;": '\U0000229F',
// "boxplus;": '\U0000229E',
// "boxtimes;": '\U000022A0',
// "boxuL;": '\U0000255B',
// "boxuR;": '\U00002558',
// "boxul;": '\U00002518',
// "boxur;": '\U00002514',
// "boxv;": '\U00002502',
// "boxvH;": '\U0000256A',
// "boxvL;": '\U00002561',
// "boxvR;": '\U0000255E',
// "boxvh;": '\U0000253C',
// "boxvl;": '\U00002524',
// "boxvr;": '\U0000251C',
// "bprime;": '\U00002035',
// "breve;": '\U000002D8',
// "brvbar;": '\U000000A6',
// "bscr;": '\U0001D4B7',
// "bsemi;": '\U0000204F',
// "bsim;": '\U0000223D',
// "bsime;": '\U000022CD',
// "bsol;": '\U0000005C',
// "bsolb;": '\U000029C5',
// "bsolhsub;": '\U000027C8',
// "bull;": '\U00002022',
// "bullet;": '\U00002022',
// "bump;": '\U0000224E',
// "bumpE;": '\U00002AAE',
// "bumpe;": '\U0000224F',
// "bumpeq;": '\U0000224F',
// "cacute;": '\U00000107',
// "cap;": '\U00002229',
// "capand;": '\U00002A44',
// "capbrcup;": '\U00002A49',
// "capcap;": '\U00002A4B',
// "capcup;": '\U00002A47',
// "capdot;": '\U00002A40',
// "caret;": '\U00002041',
// "caron;": '\U000002C7',
// "ccaps;": '\U00002A4D',
// "ccaron;": '\U0000010D',
// "ccedil;": '\U000000E7',
// "ccirc;": '\U00000109',
// "ccups;": '\U00002A4C',
// "ccupssm;": '\U00002A50',
// "cdot;": '\U0000010B',
// "cedil;": '\U000000B8',
// "cemptyv;": '\U000029B2',
// "cent;": '\U000000A2',
// "centerdot;": '\U000000B7',
// "cfr;": '\U0001D520',
// "chcy;": '\U00000447',
// "check;": '\U00002713',
// "checkmark;": '\U00002713',
// "chi;": '\U000003C7',
// "cir;": '\U000025CB',
// "cirE;": '\U000029C3',
// "circ;": '\U000002C6',
// "circeq;": '\U00002257',
// "circlearrowleft;": '\U000021BA',
// "circlearrowright;": '\U000021BB',
// "circledR;": '\U000000AE',
// "circledS;": '\U000024C8',
// "circledast;": '\U0000229B',
// "circledcirc;": '\U0000229A',
// "circleddash;": '\U0000229D',
// "cire;": '\U00002257',
// "cirfnint;": '\U00002A10',
// "cirmid;": '\U00002AEF',
// "cirscir;": '\U000029C2',
// "clubs;": '\U00002663',
// "clubsuit;": '\U00002663',
// "colon;": '\U0000003A',
// "colone;": '\U00002254',
// "coloneq;": '\U00002254',
// "comma;": '\U0000002C',
// "commat;": '\U00000040',
// "comp;": '\U00002201',
// "compfn;": '\U00002218',
// "complement;": '\U00002201',
// "complexes;": '\U00002102',
// "cong;": '\U00002245',
// "congdot;": '\U00002A6D',
// "conint;": '\U0000222E',
// "copf;": '\U0001D554',
// "coprod;": '\U00002210',
// "copy;": '\U000000A9',
// "copysr;": '\U00002117',
// "crarr;": '\U000021B5',
// "cross;": '\U00002717',
// "cscr;": '\U0001D4B8',
// "csub;": '\U00002ACF',
// "csube;": '\U00002AD1',
// "csup;": '\U00002AD0',
// "csupe;": '\U00002AD2',
// "ctdot;": '\U000022EF',
// "cudarrl;": '\U00002938',
// "cudarrr;": '\U00002935',
// "cuepr;": '\U000022DE',
// "cuesc;": '\U000022DF',
// "cularr;": '\U000021B6',
// "cularrp;": '\U0000293D',
// "cup;": '\U0000222A',
// "cupbrcap;": '\U00002A48',
// "cupcap;": '\U00002A46',
// "cupcup;": '\U00002A4A',
// "cupdot;": '\U0000228D',
// "cupor;": '\U00002A45',
// "curarr;": '\U000021B7',
// "curarrm;": '\U0000293C',