Merge remote-tracking branch 'openstreetmap/pull/1348'
This commit is contained in:
commit
d478f94239
2 changed files with 8 additions and 1 deletions
|
@ -17,7 +17,7 @@ xml.rss("version" => "2.0",
|
||||||
|
|
||||||
@entries.each do |entry|
|
@entries.each do |entry|
|
||||||
xml.item do
|
xml.item do
|
||||||
xml.title h(entry.title)
|
xml.title entry.title
|
||||||
xml.link url_for(:action => "view", :id => entry.id, :display_name => entry.user.display_name, :host => SERVER_URL)
|
xml.link url_for(:action => "view", :id => entry.id, :display_name => entry.user.display_name, :host => SERVER_URL)
|
||||||
xml.guid url_for(:action => "view", :id => entry.id, :display_name => entry.user.display_name, :host => SERVER_URL)
|
xml.guid url_for(:action => "view", :id => entry.id, :display_name => entry.user.display_name, :host => SERVER_URL)
|
||||||
xml.description entry.body.to_html
|
xml.description entry.body.to_html
|
||||||
|
|
|
@ -563,6 +563,13 @@ class DiaryEntryControllerTest < ActionController::TestCase
|
||||||
assert_response :not_found, "Should not be able to get a deleted users diary RSS"
|
assert_response :not_found, "Should not be able to get a deleted users diary RSS"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_rss_character_escaping
|
||||||
|
create(:diary_entry, :title => "<script>")
|
||||||
|
get :rss, :format => :rss
|
||||||
|
|
||||||
|
assert_match "<title><script></title>", response.body
|
||||||
|
end
|
||||||
|
|
||||||
def test_view
|
def test_view
|
||||||
# Try a normal entry that should work
|
# Try a normal entry that should work
|
||||||
diary_entry = create(:diary_entry, :user => users(:normal_user))
|
diary_entry = create(:diary_entry, :user => users(:normal_user))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue