mirror of
https://github.com/google/nomulus.git
synced 2025-05-30 01:10:14 +02:00
Use goog.dom.safeHtmlToNode instead of deprecated htmlToDocumentFragment.
goog.dom.htmlToDocumentFragment is going to be removed in [] It is removed because its usage can cause XSS. More information: [] Tested: TAP --sample for global presubmit queue [] ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=116081948
This commit is contained in:
parent
0ef0c933d2
commit
1ecf3db5fc
1 changed files with 3 additions and 1 deletions
|
@ -21,6 +21,7 @@ goog.require('goog.dom.classlist');
|
|||
goog.require('goog.dom.xml');
|
||||
goog.require('goog.events.EventType');
|
||||
goog.require('goog.format.JsonPrettyPrinter');
|
||||
goog.require('goog.html.legacyconversions');
|
||||
goog.require('goog.json');
|
||||
goog.require('goog.testing.asserts');
|
||||
goog.require('goog.testing.events');
|
||||
|
@ -34,7 +35,8 @@ goog.require('goog.testing.net.XhrIo');
|
|||
*/
|
||||
registry.testing.addToDocument = function(html) {
|
||||
goog.global.document.body.appendChild(
|
||||
goog.dom.htmlToDocumentFragment(html));
|
||||
goog.dom.safeHtmlToNode(
|
||||
goog.html.legacyconversions.safeHtmlFromString(html)));
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue