]> git.mxchange.org Git - friendica.git/blobdiff - boot.php
Merge branch 'master' of git://github.com/friendika/friendika
[friendica.git] / boot.php
index 05b33abd6ef93d1d4d3f5cea4e5e0e5d8e806065..45fd8d16fe9345ee89e27c6c9cedb241916be669 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -1687,6 +1687,11 @@ function activity_match($haystack,$needle) {
 if(! function_exists('get_tags')) {
 function get_tags($s) {
        $ret = array();
+
+       // ignore anything in a code block
+
+       $s = preg_replace('/\[code\](.*?)\[\/code\]/sm','',$s);
+
        if(preg_match_all('/([@#][^ \x0D\x0A,:?]*)([ \x0D\x0A,:?]|$)/',$s,$match)) {
                foreach($match[1] as $match) {
                        if(strstr($match,"]")) {