diff options
author | Friendika <info@friendika.com> | 2011-01-23 16:29:30 -0800 |
---|---|---|
committer | Friendika <info@friendika.com> | 2011-01-23 16:29:30 -0800 |
commit | 00d2b583588ea1c55e9b478809e8041d6ba98639 (patch) | |
tree | 07ad38acb1beae1bce4bc56416cc64c8ad95abc8 /boot.php | |
parent | 1460fc0d710ce14d6c746eb06fc8f3a5372493c2 (diff) | |
download | volse-hubzilla-00d2b583588ea1c55e9b478809e8041d6ba98639.tar.gz volse-hubzilla-00d2b583588ea1c55e9b478809e8041d6ba98639.tar.bz2 volse-hubzilla-00d2b583588ea1c55e9b478809e8041d6ba98639.zip |
fix a few issues with code blocks, ignore tags within blocks, fold multi-line blocks to one, also turn html br into two LFs.
Diffstat (limited to 'boot.php')
-rw-r--r-- | boot.php | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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,"]")) { |