Skip to content

Commit fb7cd84

Browse files
GrahamCampbelljgm
authored andcommitted
Anchor all reUnsafeProtocol alternatives to the start of the URL
1 parent 3299d74 commit fb7cd84

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/render/html.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import { escapeXml } from "../common.js";
44
import Renderer from "./renderer.js";
55

6-
var reUnsafeProtocol = /^javascript:|vbscript:|file:|data:/i;
6+
var reUnsafeProtocol = /^(?:javascript|vbscript|file|data):/i;
77
var reSafeDataProtocol = /^data:image\/(?:png|gif|jpeg|webp)/i;
88

99
var potentiallyUnsafe = function(url) {

0 commit comments

Comments
 (0)