Source code

Revision control

Copy as Markdown

Other Tools

#data
test
#document
| "test"
#data
<b>bla</b>
#document
| <b>
| "bla"
#data
<a<embla
#errors
Parse error
#document
#data
<html><head></head><body>test</body></html>
#document
| "test"
#data
<div>test
#document
| <div>
| "test"
#data
<script>alert('i am a test')</script>
#document
#data
hello<script>alert('i am a test')</script>
#document
| "hello"
#data
<div><b>hello<script>alert('i am a test')</script>
#document
| <div>
| <b>
| "hello"
#data
<p onclick='a= 123'>Click.</p>
#document
| <p>
| "Click."
#data
<plaintext><p>text</p>
#document
| <plaintext>
| "<p>text</p>"
#data
<xmp>TEXT</xmp>
#document
| <xmp>
| "TEXT"
#data
test
#config
{ test: 123 }
#document
| "test"
#data
test
#config
{ removeElements: [] }
#document
| "test"
#data
<div>test</div><p>bla
#config
{ removeElements: ["div"] }
#document
| <p>
| "bla"
#data
<custom-element>test</custom-element>bla
#document
| "bla"
#data
<custom-element>test</custom-element>bla
#config
{ customElements: true }
#document
| "testbla"
#data
<custom-element>test</custom-element>bla
#config
{ customElements: true, elements: ["custom-element"] }
#document,
| <custom-element>
| "test"
| "bla"
#data
<custom-element>test</custom-element>bla
#config
{ customElements: false }
#document
| "bla"
#data
<custom-element>test</custom-element>bla
#config
{ removeElements: ["custom-element"], customElements: true }
#document
| "bla"
#data
<script>alert('i am a test')</script>
#config
{ removeElements: ["script"] }
#document
#data
<div>balabala<i>test</i></div><test-element>t</test-element>
#config
{ removeElements: ["test-element", "i"] }
#document
| <div>
| "balabala"
#data
<div>balabala<i>i</i><p>t</p></div>
#config
{ removeElements: ["dl", "p"] }
#document
| <div>
| "balabala"
| <i>
| "i"
#data
<div>test<div>p</div>tt<p>div</p></div>
#config
{ elements: ["p"] }
#document
| "testptt"
| <p>
| "div"
#data
<div>test</div><p>bla
#config
{ removeElements: ["div"], elements: ["div"] }
#document
| "bla"
#data
<p id='test'>Click.</p>
#config
{ removeAttributes: [] },
#document
#data
<p id='test'>Click.</p>
#config
{ removeAttributes: ["id"] }
#document
| <p>
| "Click."
#data
<p id='p' data-attribute-with-dashes='123'>Click.</p><script>document.getElementById('p').dataset.attributeWithDashes=123;</script>
#config
{ removeAttributes: ["data-attribute-with-dashes"] }
#document
| <p>
| id="p"
| "Click."
#data
<p id='p' title='p'>P</p><div id='div' title='div'>DIV</div>
#config
{ elements: [
{ name: "p", attributes: ["title"] },
{ name: "div", attributes: ["id"] },
]}
#document
| <p>
| title="p"
| "P"
| <div>
| id="div"
| "DIV"
#data
<p id='p' title='p'>P</p><div id='div' title='div'>DIV</div>
#config
{ elements:
[
{ name: "p", removeAttributes: ["title"] },
{ name: "div", removeAttributes: ["id"] },
],
}
#document
| <p>
| id="p"
| "P"
| <div>
| title="div"
| "DIV"
#data
<div id='div' title='div'>DIV</div>
#config
{ elements: [{ name: "div", attributes: ["id"], removeAttributes: ["id"] }],}
#document
| <div>
| "DIV"
#data
<div id='div' title='div'>DIV</div>
#config
{ elements: [{ name: "div", attributes: ["id", "title"] }],
attributes: []}
#document
| <div>
| "DIV"
#data
<div id='div' title='div'>DIV</div>
#config
{
elements: [{ name: "div", attributes: ["id", "title"] }],
removeAttributes: ["id", "title"]
}
#document
| <div>
| "DIV"
#data
<div id='div' title='div'>DIV</div>
#config
{
elements: [{ name: "div", removeAttributes: ["id", "title"] }],
attributes: ["id", "title"]
}
#document
| <div>
| "DIV"
#data
<p id='test' onclick='a= 123'>Click.</p>
#config
{ attributes: ["id"] }
#document
| <p>
| id="test"
| "Click."
#data
<p style='color: black'>Click.</p>
#config
{ removeAttributes: ["style"], attributes: ["style"] }
#document
| <p>
| "Click."
#data
<template><script>test</script><div>hello</div></template>
#config
{ elements: ["template", "div"] }
#document
| <template>
| content
| <div>
| "hello"
#data
<a href='javascript:evil.com'>Click.</a>
#document
| <a>
| "Click."
#data
<a href=' javascript:evil.com'>Click.</a>
#document
| <a>
| "Click."
#data
<a href='http:evil.com'>Click.</a>
#document
| <a>
| href="http:evil.com"
| "Click."
#data
<area href='javascript:evil.com'>Click.</area>
#document
| <area>
| "Click."
#data
<area href=' javascript:evil.com'>Click.</area>
#document
| <area>
| "Click."
#data
<area href='http:evil.com'>Click.</area>
#document
| <area>
| href="http:evil.com"
| "Click."
#data
<form action='javascript:evil.com'>Click.</form>
#document
| <form>
| "Click."
#data
<form action=' javascript:evil.com'>Click.</form>
#document
| <form>
| "Click."
#data
<form action='http:evil.com'>Click.</form>
#document
| <form>
| action="http:evil.com"
| "Click."
#data
<input formaction='javascript:evil.com'>Click.</input>
#document
| <input>
| "Click."
#data
<input formaction=' javascript:evil.com'>Click.</input>
#document
| <input>
| "Click."
#data
<input formaction='http:evil.com'>Click.</input>
#document
| <input>
| formaction="http:evil.com"
| "Click."
#data
<button formaction='javascript:evil.com'>Click.</button>
#document
| <button>
| "Click."
#data
<button formaction=' javascript:evil.com'>Click.</button>
#document
| <button>
| "Click."
#data
<button formaction='http:evil.com'>Click.</button>
#document
| <button>
| formaction="http:evil.com"
| "Click."
#data
<p>Some text</p></body><!-- 1 --></html><!-- 2 --><p>Some more text</p>
#document
| <p>
| "Some text"
| <p>
| "Some more text"
#data
<p>Some text</p><!-- 1 --><!-- 2 --><p>Some more text</p>
#document
| <p>
| "Some text"
| <p>
| "Some more text"
#data
<p>Some text</p><!-- 1 --><!-- 2 --><p>Some more text</p>
#config
{ comments: true }
#document
| <p>
| "Some text"
| <!-- 1 -->
| <!-- 2 -->
| <p>
| "Some more text"
#data
<p>Some text</p><!-- 1 --><!-- 2 --><p>Some more text</p>
#config
{ comments: false }
#document
| <p>
| "Some text"
| <p>
| "Some more text"
#data
<p>comment<!-- hello -->in<!-- </p> -->text</p>
#document
| <p>
| "commentintext"
#data
<p>comment<!-- hello -->in<!-- </p> -->text</p>
#config
{ comments: true }
#document
| <p>
| "comment"
| <!-- hello -->
| "in"
| <!-- </p> -->
| "text"
#data
<p>comment<!-- hello -->in<!-- </p> -->text</p>
#config
{ comments: false }
#document
| <p>
| "commentintext"
#data
<svg></svg>
#config
{ elements: ["svg"] }
#document
#data
<div><svg></svg></div>
#config
{ elements: ["div", "svg"] }
#document
| <div>
#data
<div>balabala<dl>test</dl></div>
#config
{ removeElements: ["I", "DL"] }
#document
| <div>
| "balabala"
| <dl>
| "test"
#data
<div>balabala<dl>test</dl></div>
#config
{ removeElements: ["i", "dl"] }
#document
| <div>
| "balabala"
#data
<DIV>balabala<DL>test</DL></DIV>
#config
{ removeElements: ["i", "dl"] }
#document
| <div>
| "balabala"
#data
<p id="test">Click.</p>
#config
{ removeAttributes: ["ID"] }
#document
| <p>
| id="test"
| "Click."
#data
<p ID="test">Click.</p>
#config
{ removeAttributes: ["ID"] }
#document
| <p>
| id="test"
| "Click."
#data
<p ID="test">Click.</p>
#config
{ removeAttributes: ["id"] }
#document
| <p>
| "Click."
#data
<div>balabala<i>test</i></div><test>t</test><custom-element>custom-element</custom-element>
#config
{ removeElements: [123, "test", "i", "custom-element"] }
#document
| <div>
| "balabala"
#data
<div>balabala<i>test</i></div><test>t</test><custom-element>custom-element</custom-element>
#config
{ replaceWithChildrenElements: [123, "test", "i", "custom-element"] }
#document
| <div>
| "balabalatest"
#data
<div>test<div>p</div>tt<p>div</p></div><test>test</test>
#config
{ elements: ["p", "test"] }
#document
| "testptt"
| <p>
| "div"
#data
<div>balabala<i>test</i></div><test>t</test><custom-element>custom-element</custom-element>
#config
{
removeElements: [123, "test", "i", "custom-element"],
unknownMarkup: true,
}
#document
| <div>
| "balabala"
#data
<div>balabala<i>test</i></div><test>t</test><custom-element>custom-element</custom-element>
#config
{
replaceWithChildrenElements: [123, "test", "i", "custom-element"],
unknownMarkup: true,
}
#document
| <div>
| "balabalatest"
| "t"
#data
<div>test<div>p</div>tt<p>div</p><test>test</test></div>
#config
{ elements: ["p", "test"], unknownMarkup: true }
#config
| "testptt"
| <p>
| "div"
| <test>
| "test"
#data
<div hello='1' world='2'><b hello='3' world='4'>
#config
{ attributes: ["hello", "world"], }
#document
| <div>
| <b>
#data
<div hello='1' world='2'><b hello='3' world='4'>
#config
{ attributes: ["hello", "world"], unknownMarkup: true, }
#document
| <div>
| hello="1"
| world="2"
| <b>
| hello="3"
| world="4"
#data
<div hello='1' world='2'><b hello='3' world='4'>
#config
{ removeAttributes: ["hello", "world"] }
#document
| <div>
| <b>
#data
<div hello='1' world='2'><b hello='3' world='4'>
#config
{ removeAttributes: ["hello", "world"], unknownMarkup: true, }
#document
| <div>
| <b>