]> git.wh0rd.org - tt-rss.git/blobdiff - include/functions2.php
fix article tags/labels not assigning properly on mysql because of the 4byte unicode...
[tt-rss.git] / include / functions2.php
index e212609db2546665192a39b29ae19a23541f65e4..1936d146d081813740bc43f9841422a1cb3f8378 100644 (file)
 
                $tag = preg_replace('/[\'\"\+\>\<]/', "", $tag);
 
-//             $tag = str_replace('"', "", $tag);
-//             $tag = str_replace("+", " ", $tag);
-               $tag = str_replace("technorati tag: ", "", $tag);
+               if (DB_TYPE == "mysql") {
+                       $tag = preg_replace('/[\x{10000}-\x{10FFFF}]/u', "\xEF\xBF\xBD", $tag);
+               }
 
                return $tag;
        }