Browse Source

Use preg_quote instead of str_replace in include/items

tags/2019.01
Hypolite Petovan 1 year ago
parent
commit
ea1946ec03
1 changed files with 1 additions and 2 deletions
  1. +1
    -2
      include/items.php

+ 1
- 2
include/items.php View File

@@ -203,8 +203,7 @@ function add_page_info_to_body($body, $texturl = false, $no_photos = false)
$body = $removedlink;
}

$url = str_replace(['/', '.'], ['\/', '\.'], $matches[1]);
$removedlink = preg_replace("/\[url\=" . $url . "\](.*?)\[\/url\]/ism", '', $body);
$removedlink = preg_replace("/\[url\=" . preg_quote($matches[1], '/') . "\](.*?)\[\/url\]/ism", '', $body);
if (($removedlink == "") || strstr($body, $removedlink)) {
$body = $removedlink;
}


Loading…
Cancel
Save