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

Unified Diff: chrome/browser/resources/settings/about_page/about_page.js

Issue 2714883002: MD Settings: About page, show error messages with <br> and <pre> tags. (Closed)
Patch Set: Resolved conflicts. Created 3 years, 10 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
Index: chrome/browser/resources/settings/about_page/about_page.js
diff --git a/chrome/browser/resources/settings/about_page/about_page.js b/chrome/browser/resources/settings/about_page/about_page.js
index 0f54c43211a4c32606b6b477b0625e911cecbd35..cb26f366b61db5654928c88eb6155d1350aa9c96 100644
--- a/chrome/browser/resources/settings/about_page/about_page.js
+++ b/chrome/browser/resources/settings/about_page/about_page.js
@@ -277,17 +277,16 @@ Polymer({
return this.i18n('aboutUpgradeUpdating');
default:
function formatMessage(msg) {
- return '<div>' +
- parseHtmlSubset('<b>' + msg + '</b>').firstChild.innerHTML +
- '</div>';
+ return parseHtmlSubset(
+ '<b>' + msg + '</b>', ['br', 'pre']).firstChild.innerHTML;
}
var result = '';
var message = this.currentUpdateStatusEvent_.message;
- if (!!message)
+ if (message)
result += formatMessage(message);
var connectMessage = this.currentUpdateStatusEvent_.connectionTypes;
- if (!!connectMessage)
- result += formatMessage(connectMessage);
+ if (connectMessage)
+ result += '<div>' + formatMessage(connectMessage) + '</div>';
return result;
}
},
« no previous file with comments | « chrome/browser/resources/settings/about_page/about_page.html ('k') | chrome/test/data/webui/settings/about_page_tests.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698