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

Unified Diff: chrome/browser/resources/md_user_manager/create_profile.js

Issue 1920253002: Refactors parse_html_subset() into i18n_behavior. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Whitelists <span> and exposes another function in I18nBehavior API 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
Index: chrome/browser/resources/md_user_manager/create_profile.js
diff --git a/chrome/browser/resources/md_user_manager/create_profile.js b/chrome/browser/resources/md_user_manager/create_profile.js
index 8f12f20550132ecc66275d85cc7c36e873afcade..73136c7a59a83b95d8cd6f5eb5b391a734e2eb4e 100644
--- a/chrome/browser/resources/md_user_manager/create_profile.js
+++ b/chrome/browser/resources/md_user_manager/create_profile.js
@@ -282,10 +282,26 @@ Polymer({
}
}
+ var extraAllowedAttributes = {
+ 'id': function(node, value) {
+ return node.tagName == 'A' && value != '';
+ },
+ 'is': function(node, value) {
+ return node.tagName == 'A' && value == 'action-link';
+ },
+ 'role': function(node, value) {
+ return node.tagName == 'A' && value == 'link';
+ },
+ 'tabindex': function(node, value) {
+ return node.tagName == 'A';
+ },
+ };
+
this.handleMessage_(allOnCurrentDevice ?
this.i18n('managedProfilesExistingLocalSupervisedUser') :
- this.i18n('manageProfilesExistingSupervisedUser',
- HTMLEscape(elide(this.profileName_, /* maxLength */ 50))));
+ this.i18nExtraTagsAttrs('manageProfilesExistingSupervisedUser',
+ [HTMLEscape(elide(this.profileName_, /* maxLength */ 50))],
+ [], extraAllowedAttributes));
return;
}
// No existing supervised user's name matches the entered profile name.

Powered by Google App Engine
This is Rietveld 408576698