lix-website/themes/lix/assets/bootstrap/node_modules/html-escaper/test/index.js

24 lines
459 B
JavaScript
Raw Normal View History

2024-04-27 03:39:10 +00:00
delete Object.freeze;
var html = require('../cjs');
console.assert(
html.escape('&<>\'"') === '&amp;&lt;&gt;&#39;&quot;',
'correct escape'
);
console.assert(
html.escape('<>\'"&') === '&lt;&gt;&#39;&quot;&amp;',
'correct inverted escape'
);
console.assert(
'&<>\'"' === html.unescape('&amp;&lt;&gt;&#39;&quot;'),
'correct unescape'
);
console.assert(
'<>\'"&' === html.unescape('&lt;&gt;&#39;&quot;&amp;'),
'correct inverted unescape'
);