aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-06-02 18:42:51 -0700
committerredmatrix <git@macgirvin.com>2016-06-02 18:42:51 -0700
commitf9075e2a2feca0f37fdf568be6e6e53460aa9034 (patch)
treed2b30d35a2078b8a6d21999ae39db3129215aa79
parente596bf025bc2cb700d2603871286df1102d41031 (diff)
downloadvolse-hubzilla-f9075e2a2feca0f37fdf568be6e6e53460aa9034.tar.gz
volse-hubzilla-f9075e2a2feca0f37fdf568be6e6e53460aa9034.tar.bz2
volse-hubzilla-f9075e2a2feca0f37fdf568be6e6e53460aa9034.zip
some initial emoji reaction work
-rwxr-xr-xboot.php1
-rw-r--r--include/text.php6
2 files changed, 6 insertions, 1 deletions
diff --git a/boot.php b/boot.php
index 5b3a614f1..16c5fed11 100755
--- a/boot.php
+++ b/boot.php
@@ -473,6 +473,7 @@ define ( 'NAMESPACE_YMEDIA', 'http://search.yahoo.com/mrss/' );
* activity stream defines
*/
+define ( 'ACTIVITY_REACT', NAMESPACE_ZOT . '/activity/react' );
define ( 'ACTIVITY_LIKE', NAMESPACE_ACTIVITY_SCHEMA . 'like' );
define ( 'ACTIVITY_DISLIKE', NAMESPACE_ZOT . '/activity/dislike' );
define ( 'ACTIVITY_AGREE', NAMESPACE_ZOT . '/activity/agree' );
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 &amp; 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);