Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: include.postload.js

Issue 4567408790470656: Issue 1393 - Block element dialog suggests decoded URLs (Closed)
Patch Set: Created Sept. 22, 2014, 9:24 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include.postload.js
===================================================================
--- a/include.postload.js
+++ b/include.postload.js
@@ -279,11 +279,6 @@
else if (elt.src)
url = elt.src;
- // Only normalize when the element contains a URL (issue 328.)
- // The URL is not always normalized, so do it here
- if (url)
- url = normalizeURL(relativeToAbsoluteUrl(url));
-
// Construct filters. The popup will retrieve these.
// Only one ID
var elementId = elt.id ? elt.id.split(' ').join('') : null;
@@ -349,8 +344,13 @@
if(params[0])
url = params[0].getAttribute("value");
}
+
+ // Only normalize when the element contains a URL (issue 328.)
+ // The URL is not always normalized, so do it here
Wladimir Palant 2014/09/22 09:57:03 For reference: this is referring to https://code.g
Thomas Greiner 2014/09/22 13:13:49 Done.
+ if (url)
+ url = normalizeURL(relativeToAbsoluteUrl(url));
} else if(!url) {
- url = elt.getAttribute("src") || elt.getAttribute("href");
+ url = elt.src || elt.href;
}
return url;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld