diff options
author | Uģis Ozols <ugis.ozolss@gmail.com> | 2013-06-21 13:12:10 +0300 |
---|---|---|
committer | Uģis Ozols <ugis.ozolss@gmail.com> | 2013-06-21 13:12:10 +0300 |
commit | a8af874920fff981eb535d100d736f2a0017f266 (patch) | |
tree | a162f0b933377d4fd676b8cff21121f9d8af1eda | |
parent | a7cd82375d1d46a61463b4929398234bebe4a351 (diff) | |
download | refinerycms-blog-a8af874920fff981eb535d100d736f2a0017f266.tar.gz refinerycms-blog-a8af874920fff981eb535d100d736f2a0017f266.tar.bz2 refinerycms-blog-a8af874920fff981eb535d100d736f2a0017f266.zip |
Need to call html_safe on unsafe string before concatenating it to safe string.
Read explanation at
https://github.com/refinery/refinerycms-blog/issues/325#issuecomment-198
07945.
Closes #325.
-rw-r--r-- | app/views/refinery/blog/posts/_nav.html.erb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/app/views/refinery/blog/posts/_nav.html.erb b/app/views/refinery/blog/posts/_nav.html.erb index 9e87e6e..f5ea5c6 100644 --- a/app/views/refinery/blog/posts/_nav.html.erb +++ b/app/views/refinery/blog/posts/_nav.html.erb @@ -1,17 +1,17 @@ <nav id="next_prev_article"> <% if @post.next.present? -%> - <%= link_to (h(truncate(@post.next.title)) + " »").html_safe, - refinery.blog_post_path(@post.next), + <%= link_to h(truncate(@post.next.title)) + " »".html_safe, + refinery.blog_post_path(@post.next), :class => 'next' %> <% end -%> - <%= link_to t('blog_home', :scope => 'refinery.blog.posts.show'), - refinery.blog_root_path, + <%= link_to t('blog_home', :scope => 'refinery.blog.posts.show'), + refinery.blog_root_path, :class => 'home' %> <% if @post.prev.present? -%> - <%= link_to ("« " + h(truncate(@post.prev.title))).html_safe, - refinery.blog_post_path(@post.prev), + <%= link_to "« ".html_safe + h(truncate(@post.prev.title)), + refinery.blog_post_path(@post.prev), :class => 'prev' %> <% end -%> </nav><!-- /next_prev_article --> |