From a6012af00d13bdab1806b7ae172d271d4ad9ebe5 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Sat, 4 Jun 2016 17:06:12 -0700 Subject: For emojis in posts, extend smilies and save a lot of duplication of effort --- include/bbcode.php | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'include/bbcode.php') diff --git a/include/bbcode.php b/include/bbcode.php index ed332146f..42741b392 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -66,19 +66,6 @@ function bb_unspacefy_and_trim($st) { } -function bb_emoji($mtch) { - $s = strtolower($mtch[1]); - if(strpos($s,'x')) { - $e = substr($s,strpos($s,'x')+1); - if(file_exists('images/emoji/' . $e . '.png')) { - return 'emoji'; - } - else { - return $mtch[0]; - } - } -} - function bb_extract_images($body) { $saved_image = array(); @@ -1014,7 +1001,6 @@ function bbcode($Text, $preserve_nl = false, $tryoembed = true, $cache = false) $Text = preg_replace_callback("/\[pre\](.*?)\[\/pre\]/ism", 'bb_unspacefy_and_trim', $Text); } - $Text = preg_replace_callback('/\[\&\;([#a-z0-9]+)\;\]/', 'bb_emoji', $Text); $Text = preg_replace('/\[\&\;([#a-z0-9]+)\;\]/', '&$1;', $Text); // fix any escaped ampersands that may have been converted into links -- cgit v1.2.3