This commit is contained in:
Quatadah Nasdami 2022-06-28 15:51:38 +02:00
parent d6330fd3f7
commit 3c4183f783

View File

@ -221,6 +221,41 @@ function dolWebsiteReplacementOfLinks($website, $content, $removephppart = 0, $c
*/
function dolReplaceSmileyCodeWithUTF8($content)
{
$map = array(
":face_with_tears_of_joy:" => "\xF0\x9F\x98\x82",
":grinning_face_with_smiling_eyes:" => "\xF0\x9F\x98\x81",
":smiling_face_with_open_mouth:" => "\xF0\x9F\x98\x83",
":smiling_face_with_open_mouth_and_cold_sweat:" => "\xF0\x9F\x98\x85",
":smiling_face_with_open_mouth_and_tightly_closed_eyes:" => "\xF0\x9F\x98\x86",
":winking_face:" => "\xF0\x9F\x98\x89",
":smiling_face_with_smiling_eyes:" => "\xF0\x9F\x98\x8A",
":face_savouring_delicious_food:" => "\xF0\x9F\x98\x8B",
":relieved_face:" => "\xF0\x9F\x98\x8C",
":smiling_face_with_heart_shaped_eyes:" => "\xF0\x9F\x98\x8D",
":smiling_face_with_sunglasses:" => "\xF0\x9F\x98\x8E",
":smirking_face:" => "\xF0\x9F\x98\x8F",
":neutral_face:" => "\xF0\x9F\x98\x90",
":expressionless_face:" => "\xF0\x9F\x98\x91",
":unamused_face:" => "\xF0\x9F\x98\x92",
":face_with_cold_sweat:" => "\xF0\x9F\x98\x93",
":pensive_face:" => "\xF0\x9F\x98\x94",
":confused_face:" => "\xF0\x9F\x98\x95",
":confounded_face:" => "\xF0\x9F\x98\x96",
":kissing_face:" => "\xF0\x9F\x98\x97",
":face_throwing_a_kiss:" => "\xF0\x9F\x98\x98",
":kissing_face_with_smiling_eyes:" => "\xF0\x9F\x98\x99",
":kissing_face_with_closed_eyes:" => "\xF0\x9F\x98\x9A",
":face_with_stuck_out_tongue:" => "\xF0\x9F\x98\x9B",
":face_with_stuck_out_tongue_and_winking_eye:" => "\xF0\x9F\x98\x9C",
":face_with_stuck_out_tongue_and_tightly_closed_eyes:" => "\xF0\x9F\x98\x9D",
":disappointed_face:" => "\xF0\x9F\x98\x9E",
":worried_face:" => "\xF0\x9F\x98\x9F",
":angry_face:" => "\xF0\x9F\x98\xA0",
":face_with_symbols_on_mouth:" => "\xF0\x9F\x98\xA1",
);
foreach ($map as $key => $value) {
$content = str_replace($key, $value, $content);
}
return $content;
}