forked from GNUsocial/gnu-social
		
	Merge commit 'mainline-write/0.8.x' into 0.8.x
This commit is contained in:
		@@ -326,6 +326,7 @@ class DesignSettingsAction extends AccountSettingsAction
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        $this->script('js/farbtastic/farbtastic.js');
 | 
					        $this->script('js/farbtastic/farbtastic.js');
 | 
				
			||||||
        $this->script('js/farbtastic/farbtastic.go.js');
 | 
					        $this->script('js/farbtastic/farbtastic.go.js');
 | 
				
			||||||
 | 
					        $this->script('js/userdesign.go.js');
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -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 = preg_replace('/[\x{0}-\x{8}\x{b}-\x{c}\x{e}-\x{19}]/', '', $r);
 | 
				
			||||||
    $r = common_replace_urls_callback($r, 'common_linkify');
 | 
					    $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
 | 
					    // XXX: machine tags
 | 
				
			||||||
    return $r;
 | 
					    return $r;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -27,8 +27,20 @@ class HashTagDetectionTests extends PHPUnit_Framework_TestCase
 | 
				
			|||||||
        return array(
 | 
					        return array(
 | 
				
			||||||
                     array('hello',
 | 
					                     array('hello',
 | 
				
			||||||
                           'hello'),
 | 
					                           'hello'),
 | 
				
			||||||
                     array('#hello',
 | 
					                     array('#hello people',
 | 
				
			||||||
                           '#<span class="tag"><a href="' . common_local_url('tag', array('tag' => common_canonical_tag('hello'))) . '" rel="tag">hello</a></span>'),
 | 
					                           '#<span class="tag"><a href="' . common_local_url('tag', array('tag' => common_canonical_tag('hello'))) . '" rel="tag">hello</a></span> people'),
 | 
				
			||||||
 | 
					                     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('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'),
 | 
				
			||||||
 | 
					                     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'),
 | 
				
			||||||
                     );
 | 
					                     );
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user