Skip to content

Commit b5f5168

Browse files
committed
moar "no protocol" values for even more IE dialects
1 parent 5d721d6 commit b5f5168

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/lib/svg_text_utils.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -254,11 +254,11 @@ var TAG_CLOSE = {
254254

255255
/*
256256
* Whitelist of protocols in user-supplied urls. Mostly we want to avoid javascript
257-
* and related attack vectors. The empty string is there for IE, that treats
258-
* relative paths as having no protocol, while other browsers have these explicitly
259-
* inherit the protocol of the page they're in.
257+
* and related attack vectors. The empty items are there for IE, that in various
258+
* versions treats relative paths as having different flavors of no protocol, while
259+
* other browsers have these explicitly inherit the protocol of the page they're in.
260260
*/
261-
var PROTOCOLS = ['http:', 'https:', 'mailto:', ''];
261+
var PROTOCOLS = ['http:', 'https:', 'mailto:', '', undefined, ':'];
262262

263263
var STRIP_TAGS = new RegExp('</?(' + Object.keys(TAG_STYLES).join('|') + ')( [^>]*)?/?>', 'g');
264264

0 commit comments

Comments
 (0)