X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Ftags.php;h=0a094384782bb4358af16ac28811182ade537a84;hb=364d88fa7016d961d0c00b6c22245451ccc8b5e1;hp=fc1b57db4b9343da5ac0e41735fd6b0eed9d96f0;hpb=9bdd41b77402487e9992fa87e50b222d7f707cf4;p=friendica.git diff --git a/include/tags.php b/include/tags.php index fc1b57db4b..0a09438478 100644 --- a/include/tags.php +++ b/include/tags.php @@ -1,13 +1,11 @@ get_baseurl(); + $profile_base = App::get_baseurl(); $profile_data = parse_url($profile_base); $profile_base_friendica = $profile_data['host'].$profile_data['path']."/profile/"; $profile_base_diaspora = $profile_data['host'].$profile_data['path']."/u/"; - $searchpath = $a->get_baseurl()."/search?tag="; + $searchpath = App::get_baseurl()."/search?tag="; $messages = q("SELECT `guid`, `uid`, `id`, `edited`, `deleted`, `created`, `received`, `title`, `body`, `tag`, `parent` FROM `item` WHERE `id` = %d LIMIT 1", intval($itemid)); @@ -37,6 +35,9 @@ function create_tags_from_item($itemid) { $data = " ".$message["title"]." ".$message["body"]." ".$tags." "; + // ignore anything in a code block + $data = preg_replace('/\[code\](.*?)\[\/code\]/sm','',$data); + $tags = array(); $pattern = "/\W\#([^\[].*?)[\s'\".,:;\?!\[\]\/]/ism";