From c3f0f191f3120c9fed3780807798855a5892a54d Mon Sep 17 00:00:00 2001 From: Nathan Coad Date: Sat, 9 Sep 2017 00:16:58 +1000 Subject: [PATCH] comment update --- booking.helper.inc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/booking.helper.inc b/booking.helper.inc index 02925f8..3f6d22a 100644 --- a/booking.helper.inc +++ b/booking.helper.inc @@ -2,11 +2,13 @@ /** * Helper function to strip emoji characters from input text - * Taken from https://www.drupal.org/node/2043439#comment-8213973 + * from https://stackoverflow.com/a/41831874/7638834 */ function _booking_remove_emoji($text){ + // Taken from https://www.drupal.org/node/2043439#comment-8213973 but doesn't seem to work //return preg_replace('/([0-9|#][\x{20E3}])|[\x{00ae}|\x{00a9}|\x{203C}|\x{2047}|\x{2048}|\x{2049}|\x{3030}|\x{303D}|\x{2139}|\x{2122}|\x{3297}|\x{3299}][\x{FE00}-\x{FEFF}]?|[\x{2190}-\x{21FF}][\x{FE00}-\x{FEFF}]?|[\x{2300}-\x{23FF}][\x{FE00}-\x{FEFF}]?|[\x{2460}-\x{24FF}][\x{FE00}-\x{FEFF}]?|[\x{25A0}-\x{25FF}][\x{FE00}-\x{FEFF}]?|[\x{2600}-\x{27BF}][\x{FE00}-\x{FEFF}]?|[\x{2900}-\x{297F}][\x{FE00}-\x{FEFF}]?|[\x{2B00}-\x{2BF0}][\x{FE00}-\x{FEFF}]?|[\x{1F000}-\x{1F6FF}][\x{FE00}-\x{FEFF}]?/u', '', $text); - //this if from https://stackoverflow.com/a/41831874/7638834 + + //this one seems to work ok $clean_text = ""; // Match Emoticons