File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -2,12 +2,12 @@ import assertString from './util/assertString';
22
33export default function unescape ( str ) {
44 assertString ( str ) ;
5- return ( str . replace ( / & a m p ; / g, '&' )
6- . replace ( / & q u o t ; / g, '"' )
5+ return ( str . replace ( / & q u o t ; / g, '"' )
76 . replace ( / & # x 2 7 ; / g, "'" )
87 . replace ( / & l t ; / g, '<' )
98 . replace ( / & g t ; / g, '>' )
109 . replace ( / & # x 2 F ; / g, '/' )
1110 . replace ( / & # x 5 C ; / g, '\\' )
12- . replace ( / & # 9 6 ; / g, '`' ) ) ;
11+ . replace ( / & # 9 6 ; / g, '`' )
12+ . replace ( / & a m p ; / g, '&' ) ) ;
1313}
Original file line number Diff line number Diff line change @@ -184,6 +184,9 @@ describe('Sanitizers', () => {
184184
185185 'Backtick: `' :
186186 'Backtick: `' ,
187+
188+ 'Escaped string: &lt;' :
189+ 'Escaped string: <' ,
187190 } ,
188191 } ) ;
189192 } ) ;
You can’t perform that action at this time.
0 commit comments