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

Side by Side Diff: chrome/browser/resources/print_preview/search/destination_search.js

Issue 1013853005: Escape printer and sender name for the printer invite banner. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 cr.define('print_preview', function() { 5 cr.define('print_preview', function() {
6 'use strict'; 6 'use strict';
7 7
8 /** 8 /**
9 * Component used for searching for a print destination. 9 * Component used for searching for a print destination.
10 * This is a modal dialog that allows the user to search and select a 10 * This is a modal dialog that allows the user to search and select a
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after
474 474
475 /** 475 /**
476 * @param {!printe_preview.Invitation} invitation Invitation to show. 476 * @param {!printe_preview.Invitation} invitation Invitation to show.
477 * @private 477 * @private
478 */ 478 */
479 showInvitation_: function(invitation) { 479 showInvitation_: function(invitation) {
480 var invitationText = ''; 480 var invitationText = '';
481 if (invitation.asGroupManager) { 481 if (invitation.asGroupManager) {
482 invitationText = loadTimeData.getStringF( 482 invitationText = loadTimeData.getStringF(
483 'groupPrinterSharingInviteText', 483 'groupPrinterSharingInviteText',
484 invitation.sender, 484 HTMLEscape(invitation.sender),
485 invitation.destination.displayName, 485 HTMLEscape(invitation.destination.displayName),
486 invitation.receiver); 486 HTMLEscape(invitation.receiver));
487 } else { 487 } else {
488 invitationText = loadTimeData.getStringF( 488 invitationText = loadTimeData.getStringF(
489 'printerSharingInviteText', 489 'printerSharingInviteText',
490 invitation.sender, 490 HTMLEscape(invitation.sender),
491 invitation.destination.displayName); 491 HTMLEscape(invitation.destination.displayName));
492 } 492 }
493 this.getChildElement('.invitation-text').innerHTML = invitationText; 493 this.getChildElement('.invitation-text').innerHTML = invitationText;
494 494
495 var acceptButton = this.getChildElement('.invitation-accept-button'); 495 var acceptButton = this.getChildElement('.invitation-accept-button');
496 acceptButton.textContent = loadTimeData.getString( 496 acceptButton.textContent = loadTimeData.getString(
497 invitation.asGroupManager ? 'acceptForGroup' : 'accept'); 497 invitation.asGroupManager ? 'acceptForGroup' : 'accept');
498 acceptButton.disabled = !!this.invitationStore_.invitationInProgress; 498 acceptButton.disabled = !!this.invitationStore_.invitationInProgress;
499 this.getChildElement('.invitation-reject-button').disabled = 499 this.getChildElement('.invitation-reject-button').disabled =
500 !!this.invitationStore_.invitationInProgress; 500 !!this.invitationStore_.invitationInProgress;
501 setIsVisible( 501 setIsVisible(
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
688 onWindowResize_: function() { 688 onWindowResize_: function() {
689 this.reflowLists_(); 689 this.reflowLists_();
690 } 690 }
691 }; 691 };
692 692
693 // Export 693 // Export
694 return { 694 return {
695 DestinationSearch: DestinationSearch 695 DestinationSearch: DestinationSearch
696 }; 696 };
697 }); 697 });
OLDNEW
« 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