diff options
| author | 2021-10-24 17:23:04 +0200 | |
|---|---|---|
| committer | 2021-10-24 17:23:04 +0200 | |
| commit | c5ab4cea4a773b2d61e2413a955785431517c3ce (patch) | |
| tree | cc11d29afc758439ab13930247168ceacdf6a3eb /lib | |
| parent | f1e4b980fb855cd3d6e8180f846e1ba0e6677e5e (diff) | |
Fix getNonStandardShortcuts (#3924)
#fix https://github.com/FreshRSS/FreshRSS/issues/3922
Quick fix. The `getNonStandardShortcuts()` could probably be re-written.
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/lib_rss.php | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/lib_rss.php b/lib/lib_rss.php index 602576256..4b2e2bc3d 100644 --- a/lib/lib_rss.php +++ b/lib/lib_rss.php @@ -538,10 +538,8 @@ function getNonStandardShortcuts($shortcuts) { $standard = strtolower(implode(' ', SHORTCUT_KEYS)); $nonStandard = array_filter($shortcuts, function ($shortcut) use ($standard) { - if (false !== strpos($shortcut, ' ')) { - return true; - } - return !preg_match("/${shortcut}/i", $standard); + $shortcut = trim($shortcut); + return $shortcut !== '' & stripos($standard, $shortcut) === false; }); return $nonStandard; |
