Skip to content
Browse files

Use html_safe for search results

  • Loading branch information...
1 parent 62dccf1 commit a1b35152129b37f56b116a10517da837833ba2ea @mutle committed Jan 30, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 app/views/channels/search.html.haml
View
5 app/views/channels/search.html.haml
@@ -8,6 +8,9 @@
-if result.is_a?(Channel)
=link_to "Channel Title: #{result.title}", channel_path(result)
-elsif result.is_a?(Post)
- =link_to "Channel Title: #{result.channel.title}<br />Post: #{result.excerpts.body}", channel_path(result.channel, :anchor => "post_#{result.id}")
+ -post_link = channel_path(result.channel, :anchor => "post_#{result.id}")
+ =link_to "Channel Title: #{result.channel.title}", post_link
+ %br/
+ =link_to "Post: #{result.excerpts.body}".html_safe, post_link
==by #{user_name(result.channel.user)}
=will_paginate(@search)

0 comments on commit a1b3515

Please sign in to comment.
Something went wrong with that request. Please try again.