Fix PHP Warning: preg_replace(): Compilation failed in include/items

This commit is contained in:
Hypolite Petovan 2018-02-15 22:13:45 -05:00
parent 753f92c234
commit f4d76d10b2
1 changed files with 1 additions and 1 deletions

View 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;
}