mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2025-01-29 21:51:39 +01:00
Add another test.
This commit is contained in:
parent
5e39eb8f6c
commit
0c05ff459c
@ -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"'
|
||||
|
Loading…
x
Reference in New Issue
Block a user