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:
parent
ccf59ac4ff
commit
7672a10776
1 changed files with 12 additions and 5 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue