You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
459 B
24 lines
459 B
4 years ago
|
delete Object.freeze;
|
||
|
|
||
|
var html = require('../cjs');
|
||
|
|
||
|
console.assert(
|
||
|
html.escape('&<>\'"') === '&<>'"',
|
||
|
'correct escape'
|
||
|
);
|
||
|
|
||
|
console.assert(
|
||
|
html.escape('<>\'"&') === '<>'"&',
|
||
|
'correct inverted escape'
|
||
|
);
|
||
|
|
||
|
console.assert(
|
||
|
'&<>\'"' === html.unescape('&<>'"'),
|
||
|
'correct unescape'
|
||
|
);
|
||
|
|
||
|
console.assert(
|
||
|
'<>\'"&' === html.unescape('<>'"&'),
|
||
|
'correct inverted unescape'
|
||
|
);
|