disallow hx-on if allowEval is not true

This commit is contained in:
Carson Gross 2023-05-02 14:57:19 -06:00
parent c96f01e81e
commit 1d146b103d

View File

@ -1882,7 +1882,7 @@ return (function () {
function processHxOn(elt) {
var hxOnValue = getAttributeValue(elt, 'hx-on');
if (hxOnValue) {
if (hxOnValue && htmx.config.allowEval) {
var handlers = {}
var lines = hxOnValue.split("\n");
var currentEvent = null;