use Friendica\Util\Strings;
use Friendica\Util\Temporal;
-require_once 'include/text.php';
require_once 'mod/share.php';
-require_once 'include/enotify.php';
-
function add_page_info_data(array $data, $no_photos = false)
{
Addon::callHooks('page_info_data', $data);
/// @TODO make a positive list of allowed characters
$hashtag = str_replace([" ", "+", "/", ".", "#", "'", "’", "`", "(", ")", "„", "“"],
["", "", "", "", "", "", "", "", "", "", "", ""], $keyword);
- $hashtags .= "#[url=" . System::baseUrl() . "/search?tag=" . rawurlencode($hashtag) . "]" . $hashtag . "[/url] ";
+ $hashtags .= "#[url=" . System::baseUrl() . "/search?tag=" . $hashtag . "]" . $hashtag . "[/url] ";
}
}
$tags .= ", ";
}
- $tags .= "#[url=" . System::baseUrl() . "/search?tag=" . rawurlencode($hashtag) . "]" . $hashtag . "[/url]";
+ $tags .= "#[url=" . System::baseUrl() . "/search?tag=" . $hashtag . "]" . $hashtag . "[/url]";
}
}
$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;
}
// locate item to be deleted
- $fields = ['id', 'uid', 'guid', 'contact-id', 'deleted', 'gravity', parent];
+ $fields = ['id', 'uid', 'guid', 'contact-id', 'deleted', 'gravity', 'parent'];
$item = Item::selectFirstForUser(local_user(), $fields, ['id' => $id]);
if (!DBA::isResult($item)) {