]> git.mxchange.org Git - friendica.git/commitdiff
Revert "Fix PHP Warning: preg_replace(): Compilation failed in include/items"
authorHypolite Petovan <mrpetovan@gmail.com>
Fri, 16 Feb 2018 16:12:41 +0000 (11:12 -0500)
committerGitHub <noreply@github.com>
Fri, 16 Feb 2018 16:12:41 +0000 (11:12 -0500)
include/items.php

index 1e4fe3ea012472f0ca6416d138305dd45d04af8e..31c8aaa799394dacdfaec90795523c63b325e989 100644 (file)
@@ -185,7 +185,8 @@ function add_page_info_to_body($body, $texturl = false, $no_photos = false) {
                        $body = $removedlink;
                }
 
-               $removedlink = preg_replace("/\[url\=" . preg_quote($matches[1]) . "\](.*?)\[\/url\]/ism", '', $body);
+               $url = str_replace(['/', '.'], ['\/', '\.'], $matches[1]);
+               $removedlink = preg_replace("/\[url\=" . $url . "\](.*?)\[\/url\]/ism", '', $body);
                if (($removedlink == "") || strstr($body, $removedlink)) {
                        $body = $removedlink;
                }