]> git.wh0rd.org - tt-rss.git/commitdiff
get_article_filters: add unicode modifier to preg_match()
authorAndrew Dolgov <noreply@fakecake.org>
Wed, 19 Oct 2016 18:40:58 +0000 (21:40 +0300)
committerAndrew Dolgov <noreply@fakecake.org>
Wed, 19 Oct 2016 18:40:58 +0000 (21:40 +0300)
include/rssfuncs.php

index 32bc69819bf8a0fa0e059aa5044ca625403f2ed1..ccc6d515457549722177e1c97b93106fb026a582 100644 (file)
 
                                switch ($rule["type"]) {
                                case "title":
-                                       $match = @preg_match("/$reg_exp/i", $title);
+                                       $match = @preg_match("/$reg_exp/iu", $title);
                                        break;
                                case "content":
                                        // we don't need to deal with multiline regexps
                                        $content = preg_replace("/[\r\n\t]/", "", $content);
 
-                                       $match = @preg_match("/$reg_exp/i", $content);
+                                       $match = @preg_match("/$reg_exp/iu", $content);
                                        break;
                                case "both":
                                        // we don't need to deal with multiline regexps
                                        $content = preg_replace("/[\r\n\t]/", "", $content);
 
-                                       $match = (@preg_match("/$reg_exp/i", $title) || @preg_match("/$reg_exp/i", $content));
+                                       $match = (@preg_match("/$reg_exp/iu", $title) || @preg_match("/$reg_exp/iu", $content));
                                        break;
                                case "link":
-                                       $match = @preg_match("/$reg_exp/i", $link);
+                                       $match = @preg_match("/$reg_exp/iu", $link);
                                        break;
                                case "author":
-                                       $match = @preg_match("/$reg_exp/i", $author);
+                                       $match = @preg_match("/$reg_exp/iu", $author);
                                        break;
                                case "tag":
                                        foreach ($tags as $tag) {
-                                               if (@preg_match("/$reg_exp/i", $tag)) {
+                                               if (@preg_match("/$reg_exp/iu", $tag)) {
                                                        $match = true;
                                                        break;
                                                }