aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2015-01-14 16:00:21 -0800
committerfriendica <info@friendica.com>2015-01-14 16:00:21 -0800
commitd6ae124bbd549629ec7d76bb1b1555d1344ac8b4 (patch)
tree21a777caf5a69c61a2b66265541819f62cfe0cb6 /include
parent7a24943c3437fbd78948121c54b9a94a26bd8996 (diff)
downloadvolse-hubzilla-d6ae124bbd549629ec7d76bb1b1555d1344ac8b4.tar.gz
volse-hubzilla-d6ae124bbd549629ec7d76bb1b1555d1344ac8b4.tar.bz2
volse-hubzilla-d6ae124bbd549629ec7d76bb1b1555d1344ac8b4.zip
ignore bbcode open tag (left bracket) in hash and mention tag regexes and turn it into a tag delimiter
Diffstat (limited to 'include')
-rw-r--r--include/text.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/text.php b/include/text.php
index 18ef22d28..c130a9b8a 100644
--- a/include/text.php
+++ b/include/text.php
@@ -620,7 +620,7 @@ function get_tags($s) {
// Match full names against @tags including the space between first and last
// We will look these up afterward to see if they are full names or not recognisable.
- if(preg_match_all('/(@[^ \x0D\x0A,:?]+ [^ \x0D\x0A@,:?]+)([ \x0D\x0A@,:?]|$)/',$s,$match)) {
+ if(preg_match_all('/(@[^ \x0D\x0A,:?\[]+ [^ \x0D\x0A@,:?\[]+)([ \x0D\x0A@,:?\[]|$)/',$s,$match)) {
foreach($match[1] as $mtch) {
if(strstr($mtch,"]")) {
// we might be inside a bbcode color tag - leave it alone
@@ -636,7 +636,7 @@ function get_tags($s) {
// Otherwise pull out single word tags. These can be @nickname, @first_last
// and #hash tags.
- if(preg_match_all('/([@#][^ \x0D\x0A,;:?]+)([ \x0D\x0A,;:?]|$)/',$s,$match)) {
+ if(preg_match_all('/([@#][^ \x0D\x0A,;:?\[]+)([ \x0D\x0A,;:?\[]|$)/',$s,$match)) {
foreach($match[1] as $mtch) {
if(strstr($mtch,"]")) {
// we might be inside a bbcode color tag - leave it alone