File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
packages/react-query-next-experimental/src Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change 1010// License: https://github.com/zertosh/htmlescape/blob/0527ca7156a524d256101bb310a9f970f63078ad/LICENSE
1111
1212const ESCAPE_LOOKUP : { [ match : string ] : string } = {
13- "&" : " \\u0026" ,
14- ">" : " \\u003e" ,
15- "<" : " \\u003c" ,
16- " \u2028" : " \\u2028" ,
17- " \u2029" : " \\u2029" ,
18- } ;
13+ '&' : ' \\u0026' ,
14+ '>' : ' \\u003e' ,
15+ '<' : ' \\u003c' ,
16+ ' \u2028' : ' \\u2028' ,
17+ ' \u2029' : ' \\u2029' ,
18+ }
1919
20- export const ESCAPE_REGEX = / [ & > < \u2028 \u2029 ] / g;
20+ export const ESCAPE_REGEX = / [ & > < \u2028 \u2029 ] / g
2121
2222export function htmlEscapeJsonString ( str : string ) : string {
23- return str . replace ( ESCAPE_REGEX , ( match ) => ESCAPE_LOOKUP [ match ] ) ;
23+ return str . replace ( ESCAPE_REGEX , ( match ) => ESCAPE_LOOKUP [ match ] ! )
2424}
You can’t perform that action at this time.
0 commit comments