aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortoclimb <toclimb@misanthrozot.com>2014-01-29 00:43:54 +0100
committertoclimb <toclimb@misanthrozot.com>2014-01-29 00:43:54 +0100
commit3cab53a7efbc58cdf1d81740cf00136c016e2863 (patch)
tree617852fcaf222c7c0fe7178fedeee3f01f371c73
parentf104b4dc275891785ec03abd779d8aafe5163815 (diff)
downloadvolse-hubzilla-3cab53a7efbc58cdf1d81740cf00136c016e2863.tar.gz
volse-hubzilla-3cab53a7efbc58cdf1d81740cf00136c016e2863.tar.bz2
volse-hubzilla-3cab53a7efbc58cdf1d81740cf00136c016e2863.zip
Don't look for text emoticons inside the matching angle brackets of a HTML tag
-rwxr-xr-xinclude/text.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/text.php b/include/text.php
index f5c440e4a..4cb7a1d5e 100755
--- a/include/text.php
+++ b/include/text.php
@@ -891,6 +891,7 @@ function smilies($s, $sample = false) {
$s = preg_replace_callback('/<pre>(.*?)<\/pre>/ism','smile_encode',$s);
$s = preg_replace_callback('/<code>(.*?)<\/code>/ism','smile_encode',$s);
+ $s = preg_replace_callback('/<(.*?)>/s','smile_encode',$s);
$texts = array(
'&lt;3',
@@ -983,6 +984,7 @@ function smilies($s, $sample = false) {
$s = preg_replace_callback('/<pre>(.*?)<\/pre>/ism','smile_decode',$s);
$s = preg_replace_callback('/<code>(.*?)<\/code>/ism','smile_decode',$s);
+ $s = preg_replace_callback('/<(.*?)>/s','smile_decode',$s);
return $s;