Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit bf1f5d0

Browse files
fix(sanitizeUri): sanitize URIs that contain IDEOGRAPHIC SPACE chars
Chrome 62 was not sanitizing dangerous URLs containing JavaScript, if they started with these "whitespace" characters. Closes #16288
1 parent 0864f73 commit bf1f5d0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ng/sanitizeUri.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ function $$SanitizeUriProvider() {
6262
return function sanitizeUri(uri, isImage) {
6363
var regex = isImage ? imgSrcSanitizationWhitelist : aHrefSanitizationWhitelist;
6464
var normalizedVal;
65-
normalizedVal = urlResolve(uri).href;
65+
normalizedVal = urlResolve(uri && uri.trim()).href;
6666
if (normalizedVal !== '' && !normalizedVal.match(regex)) {
6767
return 'unsafe:' + normalizedVal;
6868
}

0 commit comments

Comments
 (0)