Return note comments as formatted HTML as well as text
This commit is contained in:
parent
c3cb1de73e
commit
2ddd667910
2 changed files with 9 additions and 2 deletions
|
@ -24,6 +24,10 @@ json.properties do
|
|||
end
|
||||
|
||||
json.action comment.event
|
||||
json.text comment.body unless comment.body.nil?
|
||||
|
||||
if comment.body
|
||||
json.text comment.body.to_text
|
||||
json.html comment.body.to_html
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -21,7 +21,10 @@ xml.note("lon" => note.lon, "lat" => note.lat) do
|
|||
xml.user_url user_url(:display_name => comment.author.display_name)
|
||||
end
|
||||
|
||||
xml.text comment.body
|
||||
if comment.body
|
||||
xml.text comment.body.to_text
|
||||
xml.html comment.body.to_html
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue