2
0
mirror of https://github.com/tenrok/BBob.git synced 2026-06-14 18:42:24 +03:00

fix(plugin-helper): escape case insensitive javascript: attrs

This commit is contained in:
Nikolay Kostyurin
2020-07-08 19:34:12 +02:00
parent fe6a16b6d9
commit 5ceb2f0fa4
2 changed files with 7 additions and 1 deletions
@@ -92,6 +92,12 @@ describe('@bbob/plugin-helper', () => {
href: `javascript:alert('hello')`,
})).toBe(` onclick="javascript%3Aalert('hello')" href="javascript%3Aalert('hello')"`)
});
test(`JAVASCRIPT:alert("hello")`, () => {
expect(attrsToString({
onclick: `JAVASCRIPT:alert('hello')`,
href: `JAVASCRIPT:alert('hello')`,
})).toBe(` onclick="JAVASCRIPT%3Aalert('hello')" href="JAVASCRIPT%3Aalert('hello')"`)
});
test(`<tag>`, () => {
expect(attrsToString({
onclick: `<tag>`,