From: Hypolite Petovan Date: Fri, 16 Feb 2018 03:13:45 +0000 (-0500) Subject: Fix PHP Warning: preg_replace(): Compilation failed in include/items X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=f4d76d10b226ec48ce1b9973c963c485d64ddf1d;p=friendica.git Fix PHP Warning: preg_replace(): Compilation failed in include/items --- diff --git a/include/items.php b/include/items.php index 31c8aaa799..740376a1ee 100644 --- a/include/items.php +++ b/include/items.php @@ -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; }