File tree 2 files changed +12
-0
lines changed
packages/svelte/src/compiler/phases/1-parse/utils
2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ ' svelte ' : patch
3
+ ---
4
+
5
+ fix: allow characters in the supplementary special-purpose plane
Original file line number Diff line number Diff line change @@ -72,6 +72,8 @@ const NUL = 0;
72
72
// to replace them ourselves
73
73
//
74
74
// Source: http://en.wikipedia.org/wiki/Character_encodings_in_HTML#Illegal_characters
75
+ // Also see: https://en.wikipedia.org/wiki/Plane_(Unicode)
76
+ // Also see: https://html.spec.whatwg.org/multipage/parsing.html#preprocessing-the-input-stream
75
77
76
78
/** @param {number } code */
77
79
function validate_code ( code ) {
@@ -116,5 +118,10 @@ function validate_code(code) {
116
118
return code ;
117
119
}
118
120
121
+ // supplementary special-purpose plane 0xe0000 - 0xe07f and 0xe0100 - 0xe01ef
122
+ if ( ( code >= 917504 && code <= 917631 ) || ( code >= 917760 && code <= 917999 ) ) {
123
+ return code ;
124
+ }
125
+
119
126
return NUL ;
120
127
}
You can’t perform that action at this time.
0 commit comments