X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Ftext.php;h=f758c37ee6eb8086803aa592640f65b82680a60d;hb=893ece90664588e61584b479ca7af0021ca1df83;hp=a0ff1600ed4bcb4a9c961e50c83b4324e831c55b;hpb=ea4be0db89b5e95b50211e023e94aa008aadae46;p=friendica.git diff --git a/include/text.php b/include/text.php index a0ff1600ed..f758c37ee6 100644 --- a/include/text.php +++ b/include/text.php @@ -205,7 +205,6 @@ function hex2bin($s) { return ''; if(! ctype_xdigit($s)) { - logger('hex2bin: illegal input: ' . print_r(debug_backtrace(), true)); return($s); } @@ -610,6 +609,8 @@ function micropro($contact, $redirect = false, $class = '', $textmode = false) { $url = $redirect_url; $sparkle = ' sparkle'; } + else + $url = zrl($url); } $click = ((x($contact,'click')) ? ' onclick="' . $contact['click'] . '" ' : ''); if($click) @@ -709,27 +710,21 @@ function smilies($s, $sample = false) { '</3', '<\\3', ':-)', -// ':)', ';-)', -// ';)', ':-(', -// ':(', ':-P', -// ':P', + ':-p', ':-"', ':-"', ':-x', ':-X', ':-D', -// ':D', '8-|', '8-O', ':-O', '\\o/', 'o.O', 'O.o', - '\\.../', - '\\ooo/', ":'(", ":-!", ":-/", @@ -739,12 +734,8 @@ function smilies($s, $sample = false) { ':homebrew', ':coffee', ':facepalm', - ':headdesk', '~friendika', - '~friendica', -// 'Diaspora*' - ':beard', - ':whitebeard' + '~friendica' ); @@ -753,27 +744,21 @@ function smilies($s, $sample = false) { '</3', '<\\3', ':-)', -// ':)', ';-)', -// ';)', ':-(', -// ':(', ':-P', -// ':P', + ':-p', ':-\', ':-\', ':-x', ':-X', ':-D', -// ':D', '8-|', '8-O', ':-O', '\\o/', 'o.O', 'O.o', - '\\.../', - '\\ooo/', ':\'(', ':-!', ':-/', @@ -783,12 +768,8 @@ function smilies($s, $sample = false) { ':homebrew', ':coffee', ':facepalm', - ':headdesk', '~friendika ~friendika', - '~friendica ~friendica', -// 'DiasporaDiaspora*', - ':beard', - ':whitebeard' + '~friendica ~friendica' ); $params = array('texts' => $texts, 'icons' => $icons, 'string' => $s); @@ -960,6 +941,36 @@ function prepare_body($item,$attach = false) { $s .= '
' . t('Filed under:') . ' ' . $x . '
'; } + // Look for spoiler + $spoilersearch = '
'; + + // Remove line breaks before the spoiler + while ((strpos($s, "\n".$spoilersearch) !== false)) + $s = str_replace("\n".$spoilersearch, $spoilersearch, $s); + while ((strpos($s, "
".$spoilersearch) !== false)) + $s = str_replace("
".$spoilersearch, $spoilersearch, $s); + + while ((strpos($s, $spoilersearch) !== false)) { + + $pos = strpos($s, $spoilersearch); + $rnd = random_string(8); + $spoilerreplace = '
'.sprintf(t('Click to open/close')).''. + '