Home > widget-integration > EVENT_REGEX
EVENT_REGEX variable
Cached regex for DOM event detection.
Pre-compiled regular expression pattern built from the DOM_EVENTS array. Used by FilterValidationHelper for efficient XSS pattern detection without recompiling the regex on every validation call.
Signature:
EVENT_REGEX: RegExp
Remarks
This regex is compiled once at module initialization and reused across all validation operations, providing ~90% performance improvement over inline regex compilation.
Pattern matches event handler attributes (e.g., "onclick=", "onload=") and the word "script" anywhere in the input string (case-insensitive when used with normalized input).