aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2023-12-21 10:19:26 +0000
committerMario <mario@mariovavti.com>2023-12-21 10:19:26 +0000
commitc3a235242eb180860ac778743184d2297dd8f3a9 (patch)
tree681ecf37fac7eb57947c59850adb5ff20ce846f3
parentc5f620839658cf7bda144a6b5e41b46f0ae082d7 (diff)
downloadvolse-hubzilla-c3a235242eb180860ac778743184d2297dd8f3a9.tar.gz
volse-hubzilla-c3a235242eb180860ac778743184d2297dd8f3a9.tar.bz2
volse-hubzilla-c3a235242eb180860ac778743184d2297dd8f3a9.zip
do not double process quoted strings
-rw-r--r--include/text.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/text.php b/include/text.php
index 27dd94bc5..38a207c5d 100644
--- a/include/text.php
+++ b/include/text.php
@@ -904,6 +904,8 @@ function get_tags($s) {
$ret[] = $mtch;
}
}
+
+
if(preg_match_all('/([@#\!]\".*?\")/',$s,$match)) {
foreach($match[1] as $mtch) {
$ret[] = $mtch;
@@ -936,6 +938,8 @@ function get_tags($s) {
// or quote remnants from the quoted strings we already picked out earlier
if(strpos($mtch,'&quot'))
continue;
+ if(strpos($mtch,'"'))
+ continue;
$ret[] = $mtch;
}
@@ -1639,6 +1643,7 @@ function format_hashtags(&$item) {
$s = '';
$terms = isset($item['term']) ? get_terms_oftype($item['term'], array(TERM_HASHTAG, TERM_COMMUNITYTAG)) : [];
+
if($terms) {
foreach($terms as $t) {
$term = htmlspecialchars($t['term'], ENT_COMPAT, 'UTF-8', false) ;