mirror of
https://github.com/friendica/friendica
synced 2025-04-18 05:10:19 +00:00
set character encoding to utf-8 for parsing rendered-html
This commit is contained in:
parent
c8b43e688f
commit
d590df9a72
1 changed files with 2 additions and 2 deletions
|
@ -3143,9 +3143,9 @@ class Item
|
||||||
*/
|
*/
|
||||||
private function cutAttachedImages($rendered_html)
|
private function cutAttachedImages($rendered_html)
|
||||||
{
|
{
|
||||||
$doc = new DOMDocument();
|
$doc = new DOMDocument('1.0', 'UTF-8');
|
||||||
libxml_use_internal_errors(true);
|
libxml_use_internal_errors(true);
|
||||||
$doc->loadHTML($rendered_html);
|
$doc->loadHTML(mb_convert_encoding($rendered_html, 'html-entities', 'utf-8'));
|
||||||
libxml_clear_errors();
|
libxml_clear_errors();
|
||||||
|
|
||||||
$root = $doc->getElementsByTagName("p")[0];
|
$root = $doc->getElementsByTagName("p")[0];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue