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

Unified Diff: third_party/WebKit/Source/devtools/front_end/resources/AppManifestView.js

Issue 2837943003: DevTools: trim the leading BOM char when parsing web manifest. (Closed)
Patch Set: Created 3 years, 8 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/resources/AppManifestView.js
diff --git a/third_party/WebKit/Source/devtools/front_end/resources/AppManifestView.js b/third_party/WebKit/Source/devtools/front_end/resources/AppManifestView.js
index c7ff8142f0953929f649b92c7fcd3f6927a64111..2354b93bb8ac1c9372217fea7050c953c3e7949b 100644
--- a/third_party/WebKit/Source/devtools/front_end/resources/AppManifestView.js
+++ b/third_party/WebKit/Source/devtools/front_end/resources/AppManifestView.js
@@ -106,6 +106,9 @@ Resources.AppManifestView = class extends UI.VBox {
if (!data)
return;
+ if (data.charCodeAt(0) === 0xFEFF)
+ data = data.slice(1); // Trim the BOM as per https://tools.ietf.org/html/rfc7159#section-8.1.
+
var parsedManifest = JSON.parse(data);
this._nameField.textContent = stringProperty('name');
this._shortNameField.textContent = stringProperty('short_name');
« 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