Skip to content
This repository has been archived by the owner on Jul 15, 2019. It is now read-only.

Commit

Permalink
update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
adon committed Aug 10, 2015
1 parent 15d9d43 commit eeac3db
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/xss-filters.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,14 @@ exports._getPrivFilters = function () {
SPECIAL_HTML_CHARS = /[&<>"'`]/g,
SPECIAL_COMMENT_CHARS = /(?:\x00|^-*!?>|--!?>|--?!?$|\]>|\]$)/g;

// CSS sensitive chars: ()"'/,!*@{}:;
// By CSS: (Tab|NewLine|colon|semi|lpar|rpar|apos|sol|comma|excl|ast|midast);|(quot|QUOT)
// By URI_PROTOCOL: (Tab|NewLine);
// Only a limited set of named references require decoding:
// for CSS: (Tab|NewLine|colon|semi|lpar|rpar|apos|sol|comma|excl|ast|midast);|(quot|QUOT);?
// for URI: (Tab|NewLine); colon; is decoded by URI_PROTOCOL_COLON
// for generic html decoding: (apos;|(nbsp|lt|LT|gt|GT|amp|AMP|quot|QUOT);?)
var SENSITIVE_HTML_ENTITIES = /&(?:#([xX][0-9A-Fa-f]+|\d+);?|(Tab|NewLine|colon|semi|lpar|rpar|apos|sol|comma|excl|ast|midast|ensp|emsp|thinsp);|(nbsp|amp|AMP|lt|LT|gt|GT|quot|QUOT);?)/g,
SENSITIVE_NAMED_REF_MAP = {Tab: '\t', NewLine: '\n', colon: ':', semi: ';', lpar: '(', rpar: ')', apos: '\'', sol: '/', comma: ',', excl: '!', ast: '*', midast: '*', ensp: '\u2002', emsp: '\u2003', thinsp: '\u2009', nbsp: '\xA0', amp: '&', AMP: '&', lt: '<', LT: '<', gt: '>', GT: '>', quot: '"', QUOT: '"'};

// CSS sensitive chars: ()"'/,!*@{}:;
// var CSS_VALID_VALUE =
// /^(?:
// (?!-*expression)#?[-\w]+
Expand Down

0 comments on commit eeac3db

Please sign in to comment.