where possible strip zid parameter from links that get pasted into posts so that they will get a correct zid when rendered

This commit is contained in:
zotlabs
2018-04-26 20:27:14 -07:00
committed by Mario Vavti
parent e33d8c288b
commit d0ba2cf6d4
3 changed files with 11 additions and 5 deletions

View File

@@ -3267,6 +3267,7 @@ function cleanup_bbcode($body) {
* First protect any url inside certain bbcode tags so we don't double link it.
*/
$body = preg_replace_callback('/\[code(.*?)\[\/(code)\]/ism','\red_escape_codeblock',$body);
$body = preg_replace_callback('/\[url(.*?)\[\/(url)\]/ism','\red_escape_codeblock',$body);
$body = preg_replace_callback('/\[zrl(.*?)\[\/(zrl)\]/ism','\red_escape_codeblock',$body);
@@ -3296,7 +3297,6 @@ function cleanup_bbcode($body) {
$body = scale_external_images($body,false);
return $body;
}