From f4d76d10b226ec48ce1b9973c963c485d64ddf1d Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Thu, 15 Feb 2018 22:13:45 -0500 Subject: [PATCH] Fix PHP Warning: preg_replace(): Compilation failed in include/items --- include/items.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.39.5