]> git.mxchange.org Git - friendica.git/commitdiff
Merge remote-tracking branch 'upstream/master'
authorMichael Vogel <icarus@dabo.de>
Fri, 17 May 2013 06:08:34 +0000 (08:08 +0200)
committerMichael Vogel <icarus@dabo.de>
Fri, 17 May 2013 06:08:34 +0000 (08:08 +0200)
1  2 
include/bbcode.php

diff --combined include/bbcode.php
index d16dcb6a7fcf7417a1b3ad9d168ccf10854c52af,c341f37f97ce394d0e5ce4b92f2ea8e5f69e3311..5b676bbadbf16adc628d37aaad9c7b7ee5789ee4
@@@ -407,6 -407,10 +407,10 @@@ function bbcode($Text,$preserve_nl = fa
        $Text = preg_replace("/\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism", '<a href="$1" target="external-link">$2</a>', $Text);
        //$Text = preg_replace("/\[url\=([$URLSearchString]*)\]([$URLSearchString]*)\[\/url\]/ism", '<a href="$1" target="_blank">$2</a>', $Text);
  
+       // Red compatibility, though the link can't be authenticated on Friendica
+       $Text = preg_replace("/\[zrl\=([$URLSearchString]*)\](.*?)\[\/zrl\]/ism", '<a href="$1" target="external-link">$2</a>', $Text);
        // we may need to restrict this further if it picks up too many strays
        // link acct:user@host to a webfinger profile redirector
  
  //            $Text = mb_convert_encoding($Text, "UTF-8", 'HTML-ENTITIES');
        //}
  
 +      // Remove all hashtag addresses
 +      if (!$tryoembed) {
 +              $pattern = '/#<a.*?href="(.*?)".*?>(.*?)<\/a>/is';
 +              $Text = preg_replace($pattern, '#$2', $Text);
 +      }
 +
        call_hooks('bbcode',$Text);
  
        $a->save_timestamp($stamp1, "parser");