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

Unified Diff: remoting/webapp/background/message_window.js

Issue 503063004: Hangouts Remote Desktop Part VI - Show confirm dialog before retrieving access code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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: remoting/webapp/background/message_window.js
diff --git a/remoting/webapp/background/message_window.js b/remoting/webapp/background/message_window.js
index fee4c9b09b3f974f50a6a7637a7bc0b79460f1da..495f0a09400be26a5d136a59f5083fc029319d2c 100644
--- a/remoting/webapp/background/message_window.js
+++ b/remoting/webapp/background/message_window.js
@@ -105,9 +105,14 @@ MessageWindowImpl.prototype.onMessage_ = function(event) {
var cancelButton = document.getElementById('button-secondary');
var messageDiv = document.getElementById('message');
var infoboxDiv = document.getElementById('infobox');
+
document.getElementById('title').innerText = title;
document.querySelector('title').innerText = title;
- messageDiv.innerText = message;
+
+ // Convert new line characters to <br/> elements.
+ var escapedHTML = base.escapeHTML(message);
+ messageDiv.innerHTML = escapedHTML.replace(/\n/g, '<br/>');
+
if (showSpinner) {
messageDiv.classList.add('waiting');
messageDiv.classList.add('prominent');

Powered by Google App Engine
This is Rietveld 408576698