OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 // |logText| is expected to be escaped for HTML. | |
5 function addSavePasswordProgressLog(logText) { | 6 function addSavePasswordProgressLog(logText) { |
6 var logDiv = $('log-entries'); | 7 var logDiv = $('log-entries'); |
7 if (!logDiv) | 8 if (!logDiv) |
8 return; | 9 return; |
9 logDiv.appendChild(document.createElement('hr')); | 10 logDiv.appendChild(document.createElement('hr')); |
10 var textDiv = document.createElement('div'); | 11 var textDiv = document.createElement('div'); |
11 textDiv.innerText = logText; | 12 textDiv.innerHTML = logText; |
Tom Sepez
2014/04/11 18:57:43
Oh, not so good. How can we avoid this?
vabr (Chromium)
2014/04/11 19:03:14
I can revert it to innerText without much troubles
| |
12 logDiv.appendChild(textDiv); | 13 logDiv.appendChild(textDiv); |
13 } | 14 } |
OLD | NEW |