1
0
mirror of https://tt-rss.org/git/tt-rss.git synced 2024-06-27 12:05:06 +02:00

Merge branch 'mb4-string-only' into 'master'

Only strings need 4-byte filtering.

Things like booleans, integers, etc. can be excluded as only strings have 4-byte characters.

Keeps the data types consistent.

See merge request !30
This commit is contained in:
Andrew Dolgov 2016-07-26 23:38:48 +03:00
commit 9e38b6ca79

2
include/rssfuncs.php Executable file → Normal file
View File

@ -778,7 +778,7 @@
foreach ($article as $k => $v) {
// i guess we'll have to take the risk of 4byte unicode labels & tags here
if (!is_array($article[$k])) {
if (is_string($article[$k])) {
$article[$k] = preg_replace('/[\x{10000}-\x{10FFFF}]/u', "\xEF\xBF\xBD", $v);
}
}