Add another test.

This commit is contained in:
Danila Fedorin 2021-07-13 15:14:03 -07:00
parent 5e39eb8f6c
commit 0c05ff459c

View file

@ -345,6 +345,13 @@ export function tests() {
];
test(assert, input, output);
},
"Unknown and invalid attributes are stripped": assert => {
const input = '<em onmouseover=alert("Bad code!")>Hello</em>';
const output = [
new FormatPart("em", [new TextPart("Hello")])
];
test(assert, input, output);
},
/* Doesnt work: HTML library doesn't handle <pre><code> properly.
"Text with code block": assert => {
const code = 'main :: IO ()\nmain = putStrLn "Hello"'