hx-disable

hx-disable 属性将禁用给定元素及其所有子元素的 htmx 处理。当你在网站中包含用户生成的内容并且想要防止恶意脚本攻击时,这可以作为 HTML 转义的备份。

¥The hx-disable attribute will disable htmx processing for a given element and all its children. This can be useful as a backup for HTML escaping, when you include user generated content in your site, and you want to prevent malicious scripting attacks.

标签的值将被忽略,并且不能通过其下方的任何内容进行反转。

¥The value of the tag is ignored, and it cannot be reversed by any content beneath it.

注释

¥Notes