Fix Category Listing Bugs

The links to the category listings
were bogus, and the category listing
page needed some XSS-unprotection.
This commit is contained in:
Jacques Distler 2010-05-27 00:27:49 -05:00
parent b5a4e2fd9c
commit a57152d743
6 changed files with 30 additions and 13 deletions

View file

@ -7,8 +7,10 @@ class CategoryTest < Test::Unit::TestCase
include ChunkMatch
def test_single_category
match(Category, 'category: test', :list => ['test'], :hidden => nil)
match(Category, 'category : chunk test ', :list => ['chunk test'], :hidden => nil)
match(Category, 'category: test', :list => ['test'], :hidden => nil, :unmask_text =>
"<div class=\"property\"> category: <a class=\"category_link\" href=\"http://example.com/wiki1/list/test\">test</a></div>")
match(Category, 'category : chunk test ', :list => ['chunk test'], :hidden => nil, :unmask_text =>
"<div class=\"property\"> category: <a class=\"category_link\" href=\"http://example.com/wiki1/list/chunk+test\">chunk test</a></div>")
match(Category, ':category: test', :list => ['test'], :hidden => ':')
end