1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-09-15 18:57:05 +00:00

Apply utf8_encode only on unrecognized encoded string

This commit is contained in:
Ymage 2016-04-07 22:35:37 +02:00
parent ccf59ac4ff
commit 7672a10776

View file

@ -247,9 +247,16 @@ final class Tools
}
}
else if (is_string ($data))
{
if ('' == mb_detect_encoding($data))
{
return utf8_encode($data);
}
else
{
return $data;
}
}
return $data;
}