https://reisub.nsupdate.info/git
/
friendica.git
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
753f92c
)
Fix PHP Warning: preg_replace(): Compilation failed in include/items
author
Hypolite Petovan
<mrpetovan@gmail.com>
Fri, 16 Feb 2018 03:13:45 +0000
(22:13 -0500)
committer
Hypolite Petovan
<mrpetovan@gmail.com>
Fri, 16 Feb 2018 03:13:45 +0000
(22:13 -0500)
include/items.php
patch
|
blob
|
history
diff --git
a/include/items.php
b/include/items.php
index
31c8aaa
..
740376a
100644
(file)
--- 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;
}