forked from wallabag/wallabag
Apply utf8_encode only on unrecognized encoded string
This commit is contained in:
@ -247,9 +247,16 @@ final class Tools
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (is_string ($data))
|
else if (is_string ($data))
|
||||||
|
{
|
||||||
|
if ('' == mb_detect_encoding($data))
|
||||||
{
|
{
|
||||||
return utf8_encode($data);
|
return utf8_encode($data);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return $data;
|
||||||
|
}
|
||||||
|
}
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user