Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(54)

Unified Diff: third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js

Issue 2013843003: [DevTools] Handle valid urls with quotes inside them in SSP. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
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: third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js
diff --git a/third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js b/third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js
index 71505a19be4709a5692643005a1d3615cc06d5c7..64c41553ec7a2acf51c184ed732dbed144079c83 100644
--- a/third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js
+++ b/third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js
@@ -3107,12 +3107,11 @@ WebInspector.StylesSidebarPropertyRenderer.prototype = {
*/
_processURL: function(url)
{
- var hrefUrl = url;
- var match = hrefUrl.match(/['"]?([^'"]+)/);
- if (match)
- hrefUrl = match[1];
+ if (url.length >= 2 && (url[0] == "\"" && url[url.length - 1] == "\"") || (url[0] == "'" && url[url.length - 1] == "'"))
lushnikov 2016/05/25 18:27:11 1. === 2. You can use template strings to avoid qu
dgozman 2016/05/25 20:19:19 Done.
+ url = url.substring(1, url.length - 1);
var container = createDocumentFragment();
container.createTextChild("url(");
+ var hrefUrl = url;
if (this._rule && this._rule.resourceURL())
hrefUrl = WebInspector.ParsedURL.completeURL(this._rule.resourceURL(), hrefUrl);
else if (this._node)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698