From fc89c345ed9fa7a72ce72e3b467a575580050b4f Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Tue, 25 Aug 2009 21:48:55 +0000 Subject: [PATCH 1/2] userdesign.go.js was incorrectly removed in commit 304db1d30b4ad96f8a2ca500d224bb1609588fed --- lib/designsettings.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/designsettings.php b/lib/designsettings.php index a48ec9d227..b86265971c 100644 --- a/lib/designsettings.php +++ b/lib/designsettings.php @@ -326,6 +326,7 @@ class DesignSettingsAction extends AccountSettingsAction $this->script('js/farbtastic/farbtastic.js'); $this->script('js/farbtastic/farbtastic.go.js'); + $this->script('js/userdesign.go.js'); } /** From a2117961be463d566c8f3c6ccd9b8e840f171804 Mon Sep 17 00:00:00 2001 From: Craig Andrews Date: Tue, 25 Aug 2009 17:52:16 -0400 Subject: [PATCH 2/2] Allow ({['" to preceded #tags --- lib/util.php | 2 +- tests/HashTagDetectionTest.php | 16 ++++++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/lib/util.php b/lib/util.php index 29eb6cbbce..7c1e219138 100644 --- a/lib/util.php +++ b/lib/util.php @@ -404,7 +404,7 @@ function common_render_text($text) $r = preg_replace('/[\x{0}-\x{8}\x{b}-\x{c}\x{e}-\x{19}]/', '', $r); $r = common_replace_urls_callback($r, 'common_linkify'); - $r = preg_replace('/(^|\(|\[|\s+)#([\pL\pN_\-\.]{1,64})/e', "'\\1#'.common_tag_link('\\2')", $r); + $r = preg_replace('/(^|\"\;|\'|\(|\[|\{|\s+)#([\pL\pN_\-\.]{1,64})/e', "'\\1#'.common_tag_link('\\2')", $r); // XXX: machine tags return $r; } diff --git a/tests/HashTagDetectionTest.php b/tests/HashTagDetectionTest.php index 55e1f65bf9..901e0611cc 100644 --- a/tests/HashTagDetectionTest.php +++ b/tests/HashTagDetectionTest.php @@ -27,8 +27,20 @@ class HashTagDetectionTest extends PHPUnit_Framework_TestCase return array( array('hello', 'hello'), - array('#hello', - '#'), + array('#hello people', + '# people'), + array('"#hello" people', + '"#" people'), + array('say "#hello" people', + 'say "#" people'), + array('say (#hello) people', + 'say (#) people'), + array('say [#hello] people', + 'say [#] people'), + array('say {#hello} people', + 'say {#} people'), + array('say \'#hello\' people', + 'say \'#\' people'), ); } }