Skip to content

Commit

Permalink
" (onmouse|onload|onerror|onclick)***="*** のパターン追加
Browse files Browse the repository at this point in the history
  • Loading branch information
nanasess committed Oct 26, 2021
1 parent 704c03c commit 868752d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion data/smarty_extends/modifier.script_escape.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function smarty_modifier_script_escape($value)
{
if (is_array($value)) return $value;

$pattern = "/<script.*?>|<\/script>|javascript:|<svg.*(onload|onerror).*?>|<img.*(onload|onerror).*?>|<body.*onload.*?>|<iframe.*?>|<object.*?>|<embed.*?>|<.*onmouse.*?>/i";
$pattern = "/<script.*?>|<\/script>|javascript:|<svg.*(onload|onerror).*?>|<img.*(onload|onerror).*?>|<body.*onload.*?>|<iframe.*?>|<object.*?>|<embed.*?>|<.*onmouse.*?>|(\"|').*(onmouse|onerror|onload|onclick).*=.*(\"|').*/i";
$convert = '#script tag escaped#';

if (preg_match_all($pattern, $value, $matches)) {
Expand Down

0 comments on commit 868752d

Please sign in to comment.