aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-03-30 01:59:32 -0700
committerzotlabs <mike@macgirvin.com>2018-03-30 01:59:32 -0700
commitf54aa4f21e63e2d0be94ee92f681ddec641da441 (patch)
treeaf18bd478a80d27fbab91634c74606d469eab31f
parent6d0e1b0e07f26ee07d9f53732daab8ade12566d0 (diff)
downloadvolse-hubzilla-f54aa4f21e63e2d0be94ee92f681ddec641da441.tar.gz
volse-hubzilla-f54aa4f21e63e2d0be94ee92f681ddec641da441.tar.bz2
volse-hubzilla-f54aa4f21e63e2d0be94ee92f681ddec641da441.zip
allow case independence of replacements as well as patterns
-rw-r--r--Zotlabs/Module/Hashtags.php2
-rw-r--r--view/js/autocomplete.js2
2 files changed, 2 insertions, 2 deletions
diff --git a/Zotlabs/Module/Hashtags.php b/Zotlabs/Module/Hashtags.php
index edb631871..300485196 100644
--- a/Zotlabs/Module/Hashtags.php
+++ b/Zotlabs/Module/Hashtags.php
@@ -18,7 +18,7 @@ class Hashtags extends \Zotlabs\Web\Controller {
);
if($r) {
foreach($r as $rv) {
- $result[] = [ 'text' => strtolower($rv['term']) ];
+ $result[] = [ 'text' => $rv['term'] ];
}
}
diff --git a/view/js/autocomplete.js b/view/js/autocomplete.js
index f7570523e..7a1a7673d 100644
--- a/view/js/autocomplete.js
+++ b/view/js/autocomplete.js
@@ -210,7 +210,7 @@ function string2bb(element) {
tags = {
match: /(^|\s)(\#)([^ \n]{2,})$/,
index: 3,
- search: function(term, callback) { $.getJSON('/hashtags/' + '$f=&t=' + term).done(function(data) { callback($.map(data, function(entry) { return entry.text.indexOf(term) === 0 ? entry : null; })); }); },
+ search: function(term, callback) { $.getJSON('/hashtags/' + '$f=&t=' + term).done(function(data) { callback($.map(data, function(entry) { return entry.text.toLowerCase().indexOf(term.toLowerCase()) === 0 ? entry : null; })); }); },
replace: function(item) { return "$1$2" + item.text + ' '; },
context: function(text) { return text.toLowerCase(); },
template: tag_format