Replace emoticon images by their textual representation

References #850
This commit is contained in:
logmanoriginal 2018-10-16 19:02:47 +02:00
parent 6fce03daa7
commit 62d737efe2

View file

@ -114,6 +114,11 @@ EOD;
$content->find('footer', 0)->innertext = '';
}
// Replace emoticon images by their textual representation (part of the span)
foreach($content->find('span[title*="emoticon"]') as $emoticon) {
$emoticon->innertext = $emoticon->find('span[aria-hidden="true"]', 0)->innertext;
}
//Remove html nodes, keep only img, links, basic formatting
$content = strip_tags($content, '<a><img><i><u><br><p><h3><h4>');