Skip to content

Commit

Permalink
Fix example log output in “HTML Sanitizer API” doc (#4757)
Browse files Browse the repository at this point in the history
  • Loading branch information
franciscop authored May 6, 2021
1 parent 33874f1 commit 0130a34
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion files/en-us/web/api/html_sanitizer_api/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ <h2 id="Examples">Examples</h2>

const result = new Sanitizer().sanitizeToString(stringToClean);
console.log(result);
// Logs: "Some text &lt;b&gt;&lt;i&gt;with&lt;/i&gt;&lt;/b&gt; &lt;blink&gt;tags&lt;/blink&gt;, including a rogue script def."
// Logs: "Some text &lt;b&gt;&lt;i&gt;with&lt;/i&gt;&lt;/b&gt;, including a rogue script def."
</pre>

<p>The other method available is the {{domxref('Sanitizer.sanitize()')}} method. Which is very similar to above, however returns a {{domxref('DocumentFragment')}} with disallowed <code>script</code> and <code>blink</code> elements removed.</p>
Expand Down

0 comments on commit 0130a34

Please sign in to comment.