mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[FIX] compiler: prevent block- attributes and tags
This commit is contained in:
committed by
Samuel Degueldre
parent
12b8ce963e
commit
8ec7a6f9bf
@@ -0,0 +1,13 @@
|
||||
import { renderToString } from "../helpers";
|
||||
|
||||
describe("blacklisted tags and attributes", () => {
|
||||
test("template with block-text tag", () => {
|
||||
const template = `<div><block-text-0/>hello</div>`;
|
||||
expect(() => renderToString(template)).toThrow("Invalid tag name: 'block-text-0'");
|
||||
});
|
||||
|
||||
test("template with block-handler tag", () => {
|
||||
const template = `<div block-handler-0="click">hello</div>`;
|
||||
expect(() => renderToString(template)).toThrow("Invalid attribute: 'block-handler-0'");
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user