]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Merge commit 'mainline-write/0.8.x' into 0.8.x
authorBrenda Wallace <shiny@cpan.org>
Tue, 25 Aug 2009 22:02:07 +0000 (10:02 +1200)
committerBrenda Wallace <shiny@cpan.org>
Tue, 25 Aug 2009 22:02:07 +0000 (10:02 +1200)
lib/designsettings.php
lib/util.php
tests/HashTagDetectionTests.php

index a48ec9d2274531fecdfd24a39af3f3080dfdabee..b86265971c6645012dc030fcdc947f64e2ffc737 100644 (file)
@@ -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');
     }
 
     /**
index 29eb6cbbcea1ef02b30d4f023f8137e5a6f434c9..7c1e21913801c6ed699d131d818e2d499a3547ee 100644 (file)
@@ -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('/(^|\&quot\;|\'|\(|\[|\{|\s+)#([\pL\pN_\-\.]{1,64})/e', "'\\1#'.common_tag_link('\\2')", $r);
     // XXX: machine tags
     return $r;
 }
index 4f0b31b0df054749c21e393300a989e924ce76bf..283226bd46943b8c5856210b3d96517ceff4f62c 100644 (file)
@@ -27,8 +27,20 @@ class HashTagDetectionTests extends PHPUnit_Framework_TestCase
         return array(
                      array('hello',
                            'hello'),
-                     array('#hello',
-                           '#<span class="tag"><a href="' . common_local_url('tag', array('tag' => common_canonical_tag('hello'))) . '" rel="tag">hello</a></span>'),
+                     array('#hello people',
+                           '#<span class="tag"><a href="' . common_local_url('tag', array('tag' => common_canonical_tag('hello'))) . '" rel="tag">hello</a></span> people'),
+                     array('"#hello" people',
+                           '&quot;#<span class="tag"><a href="' . common_local_url('tag', array('tag' => common_canonical_tag('hello'))) . '" rel="tag">hello</a></span>&quot; people'),
+                     array('say "#hello" people',
+                           'say &quot;#<span class="tag"><a href="' . common_local_url('tag', array('tag' => common_canonical_tag('hello'))) . '" rel="tag">hello</a></span>&quot; people'),
+                     array('say (#hello) people',
+                           'say (#<span class="tag"><a href="' . common_local_url('tag', array('tag' => common_canonical_tag('hello'))) . '" rel="tag">hello</a></span>) people'),
+                     array('say [#hello] people',
+                           'say [#<span class="tag"><a href="' . common_local_url('tag', array('tag' => common_canonical_tag('hello'))) . '" rel="tag">hello</a></span>] people'),
+                     array('say {#hello} people',
+                           'say {#<span class="tag"><a href="' . common_local_url('tag', array('tag' => common_canonical_tag('hello'))) . '" rel="tag">hello</a></span>} people'),
+                     array('say \'#hello\' people',
+                           'say \'#<span class="tag"><a href="' . common_local_url('tag', array('tag' => common_canonical_tag('hello'))) . '" rel="tag">hello</a></span>\' people'),
                      );
     }
 }