d* - remove dupe bbcode code tags
This commit is contained in:
parent
bbf857ba39
commit
ce7a3615b5
2
boot.php
2
boot.php
|
@ -9,7 +9,7 @@ require_once('include/nav.php');
|
||||||
require_once('include/cache.php');
|
require_once('include/cache.php');
|
||||||
|
|
||||||
define ( 'FRIENDIKA_PLATFORM', 'Friendica');
|
define ( 'FRIENDIKA_PLATFORM', 'Friendica');
|
||||||
define ( 'FRIENDIKA_VERSION', '2.3.1163' );
|
define ( 'FRIENDIKA_VERSION', '2.3.1164' );
|
||||||
define ( 'DFRN_PROTOCOL_VERSION', '2.22' );
|
define ( 'DFRN_PROTOCOL_VERSION', '2.22' );
|
||||||
define ( 'DB_UPDATE_VERSION', 1103 );
|
define ( 'DB_UPDATE_VERSION', 1103 );
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,8 @@ function diaspora2bb($s) {
|
||||||
$s = preg_replace("/\[url\=?(.*?)\]https?:\/\/vimeo.com\/([0-9]+)(.*?)\[\/url\]/ism",'[vimeo]$2[/vimeo]',$s);
|
$s = preg_replace("/\[url\=?(.*?)\]https?:\/\/vimeo.com\/([0-9]+)(.*?)\[\/url\]/ism",'[vimeo]$2[/vimeo]',$s);
|
||||||
$s = preg_replace("/\[url\=https?:\/\/vimeo.com\/([0-9]+)\](.*?)\[\/url\]/ism",'[vimeo]$1[/vimeo]',$s);
|
$s = preg_replace("/\[url\=https?:\/\/vimeo.com\/([0-9]+)\](.*?)\[\/url\]/ism",'[vimeo]$1[/vimeo]',$s);
|
||||||
$s = preg_replace("/([^\]\=]|^)(https?\:\/\/)(vimeo|youtu|www\.youtube|soundcloud)([a-zA-Z0-9\:\/\-\?\&\;\.\=\_\~\#\%\$\!\+\,]+)/ism", '$1[url]$2$3$4[/url]',$s);
|
$s = preg_replace("/([^\]\=]|^)(https?\:\/\/)(vimeo|youtu|www\.youtube|soundcloud)([a-zA-Z0-9\:\/\-\?\&\;\.\=\_\~\#\%\$\!\+\,]+)/ism", '$1[url]$2$3$4[/url]',$s);
|
||||||
|
// remove duplicate adjacent code tags
|
||||||
|
$s = preg_replace("/(\[code\])+(.*?)(\[\/code\])+/ism","[code]$2[/code]", $s);
|
||||||
$s = scale_diaspora_images($s);
|
$s = scale_diaspora_images($s);
|
||||||
return $s;
|
return $s;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue