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

This commit is contained in:
Hypolite Petovan 2018-02-16 11:12:41 -05:00 committed by GitHub
parent 171c052a1d
commit e2d8c80f33
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -185,7 +185,8 @@ function add_page_info_to_body($body, $texturl = false, $no_photos = false) {
$body = $removedlink; $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)) { if (($removedlink == "") || strstr($body, $removedlink)) {
$body = $removedlink; $body = $removedlink;
} }