]> git.mxchange.org Git - friendica.git/blobdiff - include/text.php
log the D* publc messages
[friendica.git] / include / text.php
index 33add768f88980404d93989f7d0dc469a4676c83..501121c80227418a21f641d363754be8a5112ce4 100644 (file)
@@ -635,7 +635,8 @@ function valid_email($x){
 
 if(! function_exists('linkify')) {
 function linkify($s) {
-       $s = preg_replace("/(https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\.\=\_\~\#\'\%\$\!\+]*)/", ' <a href="$1" target="external-link">$1</a>', $s);
+       $s = preg_replace("/(https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\;\.\=\_\~\#\'\%\$\!\+]*)/", ' <a href="$1" target="external-link">$1</a>', $s);
+       $s = preg_replace("/\<(.*?)(src|href)=(.*?)\&amp\;(.*?)\>/ism",'<$1$2=$3&$4>',$s);
        return($s);
 }}
 
@@ -656,7 +657,7 @@ if(! function_exists('smilies')) {
 function smilies($s) {
        $a = get_app();
 
-       return str_replace(
+       $s = str_replace(
        array( '&lt;3', '&lt;/3', '&lt;\\3', ':-)', ':)', ';-)', ':-(', ':(', ':-P', ':P', ':-"', ':-x', ':-X', ':-D', '8-|', '8-O', 
                '~friendika', 'Diaspora*' ),
        array(
@@ -680,6 +681,10 @@ function smilies($s) {
                '<a href="http://joindiaspora.com">Diaspora<img src="' . $a->get_baseurl() . '/images/diaspora.png" alt="Diaspora*" /></a>',
 
        ), $s);
+
+       call_hooks('smilie', $s);
+       return $s;
+
 }}