diff options
author | Mario Vavti <mario@mariovavti.com> | 2016-06-03 09:40:37 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2016-06-03 09:40:37 +0200 |
commit | 7582802f033aa6d994691880c1594b590b179c5d (patch) | |
tree | edd3f5ab48dfada99e2b76d718b425c1698f84e8 /include | |
parent | f23bdde464ef20ad2ffcb3984cc9481955374809 (diff) | |
parent | f8949ed5d1f277a3246fecf04d3ee4619ba10b51 (diff) | |
download | volse-hubzilla-7582802f033aa6d994691880c1594b590b179c5d.tar.gz volse-hubzilla-7582802f033aa6d994691880c1594b590b179c5d.tar.bz2 volse-hubzilla-7582802f033aa6d994691880c1594b590b179c5d.zip |
Merge branch 'dev' into sabre32
Diffstat (limited to 'include')
-rw-r--r-- | include/text.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/text.php b/include/text.php index 551cb72bc..834eec920 100644 --- a/include/text.php +++ b/include/text.php @@ -734,6 +734,10 @@ function get_tags($s) { // '=' needs to be avoided because when the replacement is made (in handle_tag()) it has to be ignored there // Feel free to allow '=' if the issue with '=' is solved in handle_tag() // added / ? and [ to avoid issues with hashchars in url paths + + // added ; to single word tags to allow emojis and other unicode character constructs in bbcode + // (this would actually be &#xnnnnn; but the ampersand will have been escaped to & by the time we see it.) + if(preg_match_all('/(?<![a-zA-Z0-9=\/\?])(@[^ \x0D\x0A,:?\[]+ [^ \x0D\x0A@,:?\[]+)/',$s,$match)) { foreach($match[1] as $mtch) { if(substr($mtch,-1,1) === '.') @@ -746,7 +750,7 @@ function get_tags($s) { // Otherwise pull out single word tags. These can be @nickname, @first_last // and #hash tags. - if(preg_match_all('/(?<![a-zA-Z0-9=\/\?])([@#][^ \x0D\x0A,;:?\[]+)/',$s,$match)) { + if(preg_match_all('/(?<![a-zA-Z0-9=\/\?\;])([@#][^ \x0D\x0A,;:?\[]+)/',$s,$match)) { foreach($match[1] as $mtch) { if(substr($mtch,-1,1) === '.') $mtch = substr($mtch,0,-1); |