]> git.mxchange.org Git - friendica.git/commitdiff
Fix PHP Warning: preg_replace(): Compilation failed in include/items
authorHypolite Petovan <mrpetovan@gmail.com>
Fri, 16 Feb 2018 03:13:45 +0000 (22:13 -0500)
committerHypolite Petovan <mrpetovan@gmail.com>
Fri, 16 Feb 2018 03:13:45 +0000 (22:13 -0500)
include/items.php

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