Escaping page title in RSS feeds (ticket:143)
This commit is contained in:
parent
69c839e70a
commit
eae0312932
|
@ -8,7 +8,7 @@
|
||||||
<ttl>40</ttl>
|
<ttl>40</ttl>
|
||||||
<% for page in @pages_by_revision %>
|
<% for page in @pages_by_revision %>
|
||||||
<item>
|
<item>
|
||||||
<title><%= page.plain_name %></title>
|
<title><%= h page.plain_name %></title>
|
||||||
<% unless @hide_description %>
|
<% unless @hide_description %>
|
||||||
<description><%= h page.display_content %></description>
|
<description><%= h page.display_content %></description>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -463,6 +463,19 @@ class WikiControllerTest < Test::Unit::TestCase
|
||||||
assert_equal 5, pages.size
|
assert_equal 5, pages.size
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_rss_title_with_ampersand
|
||||||
|
# was ticket:143
|
||||||
|
setup_wiki_with_three_pages
|
||||||
|
|
||||||
|
@wiki.write_page('wiki1', 'Title&With&Ampersands',
|
||||||
|
'About spaces', 1.hour.ago, Author.new('NitPicker', '127.0.0.3'))
|
||||||
|
|
||||||
|
r = process 'rss_with_headlines', 'web' => 'wiki1'
|
||||||
|
|
||||||
|
assert r.body.include?('<title>Home Page</title>')
|
||||||
|
assert r.body.include?('<title>Title&With&Ampersands</title>')
|
||||||
|
end
|
||||||
|
|
||||||
def test_save
|
def test_save
|
||||||
r = process 'save', 'web' => 'wiki1', 'id' => 'NewPage', 'content' => 'Contents of a new page',
|
r = process 'save', 'web' => 'wiki1', 'id' => 'NewPage', 'content' => 'Contents of a new page',
|
||||||
'author' => 'AuthorOfNewPage'
|
'author' => 'AuthorOfNewPage'
|
||||||
|
|
Loading…
Reference in a new issue