diff options
| author | Andrew Dolgov <fox@fakecake.org> | 2024-11-24 14:06:57 +0000 |
|---|---|---|
| committer | Andrew Dolgov <fox@fakecake.org> | 2024-11-24 14:06:57 +0000 |
| commit | 103bafd90a33abc1478e7c4ec6b732ebd04a4995 (patch) | |
| tree | f28c7ece3584a7852b6562020246b1de6167774e /classes/Sanitizer.php | |
| parent | 53fee911e6a39a5c8504d03d1f114a131d00784c (diff) | |
| parent | 667528d5b927f0f284a067b0e24c9ca7f26c28a4 (diff) | |
Merge branch 'feature/php8-str-funcs' into 'master'
Use PHP 8 'str_' functions.
See merge request tt-rss/tt-rss!81
Diffstat (limited to 'classes/Sanitizer.php')
| -rw-r--r-- | classes/Sanitizer.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/classes/Sanitizer.php b/classes/Sanitizer.php index 20ca72dc8..94d6fe621 100644 --- a/classes/Sanitizer.php +++ b/classes/Sanitizer.php @@ -20,11 +20,11 @@ class Sanitizer { foreach ($entry->attributes as $attr) { - if (strpos($attr->nodeName, 'on') === 0) { + if (str_starts_with($attr->nodeName, 'on')) { array_push($attrs_to_remove, $attr); } - if (strpos($attr->nodeName, "data-") === 0) { + if (str_starts_with($attr->nodeName, 'data-')) { array_push($attrs_to_remove, $attr); } |