"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/regexp.js" between
DOMPurify-3.0.1.tar.gz and DOMPurify-3.0.2.tar.gz

About: DOMPurify is a DOM-only XSS sanitizer for HTML, MathML and SVG (written in JavaScript).

regexp.js  (DOMPurify-3.0.1):regexp.js  (DOMPurify-3.0.2)
import { seal } from './utils.js'; import { seal } from './utils.js';
// eslint-disable-next-line unicorn/better-regex // eslint-disable-next-line unicorn/better-regex
export const MUSTACHE_EXPR = seal(/\{\{[\w\W]*|[\w\W]*\}\}/gm); // Specify templ ate detection regex for SAFE_FOR_TEMPLATES mode export const MUSTACHE_EXPR = seal(/\{\{[\w\W]*|[\w\W]*\}\}/gm); // Specify templ ate detection regex for SAFE_FOR_TEMPLATES mode
export const ERB_EXPR = seal(/<%[\w\W]*|[\w\W]*%>/gm); export const ERB_EXPR = seal(/<%[\w\W]*|[\w\W]*%>/gm);
export const TMPLIT_EXPR = seal(/\${[\w\W]*}/gm); export const TMPLIT_EXPR = seal(/\${[\w\W]*}/gm);
export const DATA_ATTR = seal(/^data-[\-\w.\u00B7-\uFFFF]/); // eslint-disable-l ine no-useless-escape export const DATA_ATTR = seal(/^data-[\-\w.\u00B7-\uFFFF]/); // eslint-disable-l ine no-useless-escape
export const ARIA_ATTR = seal(/^aria-[\-\w]+$/); // eslint-disable-line no-usele ss-escape export const ARIA_ATTR = seal(/^aria-[\-\w]+$/); // eslint-disable-line no-usele ss-escape
export const IS_ALLOWED_URI = seal( export const IS_ALLOWED_URI = seal(
/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\ -:]|$))/i // eslint-disable-line no-useless-escape /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a- z+.\-:]|$))/i // eslint-disable-line no-useless-escape
); );
export const IS_SCRIPT_OR_DATA = seal(/^(?:\w+script|data):/i); export const IS_SCRIPT_OR_DATA = seal(/^(?:\w+script|data):/i);
export const ATTR_WHITESPACE = seal( export const ATTR_WHITESPACE = seal(
/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g // eslint-disabl e-line no-control-regex /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g // eslint-disabl e-line no-control-regex
); );
export const DOCTYPE_NAME = seal(/^html$/i); export const DOCTYPE_NAME = seal(/^html$/i);
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)