aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-04-12 16:58:19 -0700
committerfriendica <info@friendica.com>2014-04-12 16:58:19 -0700
commitd7aaff459f7a7fc58568bc2cb58c1aa22061bfb4 (patch)
treee792e8fc6ab4664fccab73892c54a100c2af956b /include
parent5cb7e48dad49463686e6ae994f35b9c6654bf79d (diff)
downloadvolse-hubzilla-d7aaff459f7a7fc58568bc2cb58c1aa22061bfb4.tar.gz
volse-hubzilla-d7aaff459f7a7fc58568bc2cb58c1aa22061bfb4.tar.bz2
volse-hubzilla-d7aaff459f7a7fc58568bc2cb58c1aa22061bfb4.zip
let normal hashtags be quoted strings also
Diffstat (limited to 'include')
-rwxr-xr-xinclude/text.php13
1 files changed, 12 insertions, 1 deletions
diff --git a/include/text.php b/include/text.php
index 520c9c506..6507a3e1f 100755
--- a/include/text.php
+++ b/include/text.php
@@ -574,9 +574,20 @@ function get_tags($s) {
$s = preg_replace('/\[style=(.*?)\]/sm','',$s);
+ // match any double quoted tags
+
+ if(preg_match_all('/([@#]\&quot\;.*?\&quot\;)/',$s,$match)) {
+ foreach($match[1] as $mtch) {
+ $ret[] = $mtch;
+ }
+ }
+
// 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)) {
foreach($match[1] as $mtch) {
if(strstr($mtch,"]")) {
@@ -627,7 +638,7 @@ function get_tags($s) {
usort($ret,'tag_sort_length');
- //logger('get_tags: ' . print_r($ret,true));
+// logger('get_tags: ' . print_r($ret,true));
return $ret;
}