You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The function yii\helpers\BaseHtml::escapeJsRegularExpression() fails to process valid regular expressions when the delimiter is not /. For example, it fails with this input:
([a-z_])([a-z0-9_])*
Expected output:
/([a-z_])([a-z0-9_])*/
Actual output:
/[a-z_])/
The function truncates the input because it assumes the first character is a delimiter and tries to find the last occurrence of it to extract the pattern. This breaks when the pattern contains the first character in the middle of the pattern.