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

Unified Diff: ui/webui/resources/js/i18n_behavior.js

Issue 2938473002: [MD settings] allow unicode nbsp in i18n behavior strings (Closed)
Patch Set: Created 3 years, 6 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 | « chrome/test/data/webui/i18n_behavior_test.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/webui/resources/js/i18n_behavior.js
diff --git a/ui/webui/resources/js/i18n_behavior.js b/ui/webui/resources/js/i18n_behavior.js
index 05c9cf6567893662be14784bc12903e22dd967e6..038351867474a6a9313e870c8cc4a284a5e48069 100644
--- a/ui/webui/resources/js/i18n_behavior.js
+++ b/ui/webui/resources/js/i18n_behavior.js
@@ -40,7 +40,10 @@ var I18nBehavior = {
*/
i18n: function(id, var_args) {
var rawString = this.i18nRaw_.apply(this, arguments);
- return parseHtmlSubset('<b>' + rawString + '</b>').firstChild.innerHTML;
+ var htmlStr =
+ parseHtmlSubset('<b>' + rawString + '</b>').firstChild.innerHTML;
+ // TODO(dschuyler): use textContent rather than innerHTML; remove replace().
+ return htmlStr.replace('&nbsp;', '\u00a0');
},
/**
« no previous file with comments | « chrome/test/data/webui/i18n_behavior_test.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698