4 https://bugzilla.mozilla.org/show_bug.cgi?id=445886
7 <meta http-equiv=
"Content-type" content=
"text/html; charset=UTF-8">
8 <title>Test for Unicode non-characters
</title>
9 <script src=
"/tests/SimpleTest/SimpleTest.js"></script>
10 <link rel=
"stylesheet" type=
"text/css" href=
"/tests/SimpleTest/test.css" />
12 <body onload=
"Inject()">
14 <script class=
"testbody" type=
"text/javascript">
16 /* eslint-disable no-eval */
18 /** Test that unicode non-characters are not discarded **/
21 is($(
"display").innerHTML,
"All good.",
"Noncharacters not stripped");
25 // eslint-disable-next-line complexity
28 // script fragments containing Unicode non-characters
31 eval(
"$(\"display\
").inner\ufdd0HTML += \" U+FDD0 is evil\
"");
35 eval(
"$(\"display\
").inner\ufdd1HTML += \" U+FDD1 is evil\
"");
39 eval(
"$(\"display\
").inner\ufdd2HTML += \" U+FDD2 is evil\
"");
43 eval(
"$(\"display\
").inner\ufdd3HTML += \" U+FDD3 is evil\
"");
47 eval(
"$(\"display\
").inner\ufdd4HTML += \" U+FDD4 is evil\
"");
51 eval(
"$(\"display\
").inner\ufdd5HTML += \" U+FDD5 is evil\
"");
55 eval(
"$(\"display\
").inner\ufdd6HTML += \" U+FDD6 is evil\
"");
59 eval(
"$(\"display\
").inner\ufdd7HTML += \" U+FDD7 is evil\
"");
63 eval(
"$(\"display\
").inner\ufdd8HTML += \" U+FDD8 is evil\
"");
67 eval(
"$(\"display\
").inner\ufdd9HTML += \" U+FDD9 is evil\
"");
71 eval(
"$(\"display\
").inner\ufddaHTML += \" U+FDDA is evil\
"");
75 eval(
"$(\"display\
").inner\ufddbHTML += \" U+FDDB is evil\
"");
79 eval(
"$(\"display\
").inner\ufddcHTML += \" U+FDDC is evil\
"");
83 eval(
"$(\"display\
").inner\ufdddHTML += \" U+FDDD is evil\
"");
87 eval(
"$(\"display\
").inner\ufddeHTML += \" U+FDDE is evil\
"");
91 eval(
"$(\"display\
").inner\ufddfHTML += \" U+FDDF is evil\
"");
95 eval(
"$(\"display\
").inner\ufde0HTML += \" U+FDE0 is evil\
"");
99 eval(
"$(\"display\
").inner\ufde1HTML += \" U+FDE1 is evil\
"");
103 eval(
"$(\"display\
").inner\ufde2HTML += \" U+FDE2 is evil\
"");
107 eval(
"$(\"display\
").inner\ufde3HTML += \" U+FDE3 is evil\
"");
111 eval(
"$(\"display\
").inner\ufde4HTML += \" U+FDE4 is evil\
"");
115 eval(
"$(\"display\
").inner\ufde5HTML += \" U+FDE5 is evil\
"");
119 eval(
"$(\"display\
").inner\ufde6HTML += \" U+FDE6 is evil\
"");
123 eval(
"$(\"display\
").inner\ufde7HTML += \" U+FDE7 is evil\
"");
127 eval(
"$(\"display\
").inner\ufde8HTML += \" U+FDE8 is evil\
"");
131 eval(
"$(\"display\
").inner\ufde9HTML += \" U+FDE9 is evil\
"");
135 eval(
"$(\"display\
").inner\ufdeaHTML += \" U+FDEA is evil\
"");
139 eval(
"$(\"display\
").inner\ufdebHTML += \" U+FDEB is evil\
"");
143 eval(
"$(\"display\
").inner\ufdecHTML += \" U+FDEC is evil\
"");
147 eval(
"$(\"display\
").inner\ufdedHTML += \" U+FDED is evil\
"");
151 eval(
"$(\"display\
").inner\ufdeeHTML += \" U+FDEE is evil\
"");
155 eval(
"$(\"display\
").inner\ufdefHTML += \" U+FDEF is evil\
"");
159 eval(
"$(\"display\
").inner\ufffeHTML += \" U+FFFE is evil\
"");
163 eval(
"$(\"display\
").inner\uffffHTML += \" U+FFFF is evil\
"");
167 eval(
"$(\"display\
").inner\ud83f\udffeHTML += \" U+
1FFFE is evil\
"");
171 eval(
"$(\"display\
").inner\ud83f\udfffHTML += \" U+
1FFFF is evil\
"");
175 eval(
"$(\"display\
").inner\ud87f\udffeHTML += \" U+
2FFFE is evil\
"");
179 eval(
"$(\"display\
").inner\ud87f\udfffHTML += \" U+
2FFFF is evil\
"");
183 eval(
"$(\"display\
").inner\ud8bf\udffeHTML += \" U+
3FFFE is evil\
"");
187 eval(
"$(\"display\
").inner\ud8bf\udfffHTML += \" U+
3FFFF is evil\
"");
191 eval(
"$(\"display\
").inner\ud8ff\udffeHTML += \" U+
4FFFE is evil\
"");
195 eval(
"$(\"display\
").inner\ud8ff\udfffHTML += \" U+
4FFFF is evil\
"");
199 eval(
"$(\"display\
").inner\ud93f\udffeHTML += \" U+
5FFFE is evil\
"");
203 eval(
"$(\"display\
").inner\ud93f\udfffHTML += \" U+
5FFFF is evil\
"");
207 eval(
"$(\"display\
").inner\ud97f\udffeHTML += \" U+
6FFFE is evil\
"");
211 eval(
"$(\"display\
").inner\ud97f\udfffHTML += \" U+
6FFFF is evil\
"");
215 eval(
"$(\"display\
").inner\ud9bf\udffeHTML += \" U+
7FFFE is evil\
"");
219 eval(
"$(\"display\
").inner\ud9bf\udfffHTML += \" U+
7FFFF is evil\
"");
223 eval(
"$(\"display\
").inner\ud9ff\udffeHTML += \" U+
8FFFE is evil\
"");
227 eval(
"$(\"display\
").inner\ud9ff\udfffHTML += \" U+
8FFFF is evil\
"");
231 eval(
"$(\"display\
").inner\uda3f\udffeHTML += \" U+
9FFFE is evil\
"");
235 eval(
"$(\"display\
").inner\uda3f\udfffHTML += \" U+
9FFFF is evil\
"");
239 eval(
"$(\"display\
").inner\uda7f\udffeHTML += \" U+AFFFE is evil\
"");
243 eval(
"$(\"display\
").inner\uda7f\udfffHTML += \" U+AFFFF is evil\
"");
247 eval(
"$(\"display\
").inner\udabf\udffeHTML += \" U+BFFFE is evil\
"");
251 eval(
"$(\"display\
").inner\udabf\udfffHTML += \" U+BFFFF is evil\
"");
255 eval(
"$(\"display\
").inner\udaff\udffeHTML += \" U+CFFFE is evil\
"");
259 eval(
"$(\"display\
").inner\udaff\udfffHTML += \" U+CFFFF is evil\
"");
263 eval(
"$(\"display\
").inner\udb3f\udffeHTML += \" U+DFFFE is evil\
"");
267 eval(
"$(\"display\
").inner\udb3f\udfffHTML += \" U+DFFFF is evil\
"");
271 eval(
"$(\"display\
").inner\udb7f\udffeHTML += \" U+EFFFE is evil\
"");
275 eval(
"$(\"display\
").inner\udb7f\udfffHTML += \" U+EFFFF is evil\
"");
279 eval(
"$(\"display\
").inner\udbbf\udffeHTML += \" U+FFFFE is evil\
"");
283 eval(
"$(\"display\
").inner\udbbf\udfffHTML += \" U+FFFFF is evil\
"");
287 eval(
"$(\"display\
").inner\udbff\udffeHTML += \" U+
10FFFE is evil\
"");
291 eval(
"$(\"display\
").inner\udbff\udfffHTML += \" U+
10FFFF is evil\
"");
296 SimpleTest.waitForExplicitFinish();
299 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=445886">Mozilla Bug
445886</a>
300 <p id=
"display">All good.
</p>
301 <div id=
"content" style=
"display: none"></div>