Commit 10fd71d9b8869d5d600c841df0402787733ee4c4
1 parent
2383a17c
Exists in
master
and in
29 other branches
Article and product search excerpt changes
Showing
2 changed files
with
3 additions
and
2 deletions
Show diff stats
app/views/search/_article.rhtml
@@ -3,7 +3,7 @@ | @@ -3,7 +3,7 @@ | ||
3 | <div class="article-item-meta"> | 3 | <div class="article-item-meta"> |
4 | <% if article.body %> | 4 | <% if article.body %> |
5 | <% body_stripped = strip_tags(article.body.to_s) %> | 5 | <% body_stripped = strip_tags(article.body.to_s) %> |
6 | - <br /><span class="article-item-body"><%= excerpt(body_stripped, body_stripped.first(3), 300) %></span><br /> | 6 | + <br /><span class="article-item-body"><%= excerpt(body_stripped, body_stripped.first(3), 200) %></span><br /> |
7 | <% end %> | 7 | <% end %> |
8 | 8 | ||
9 | <br /><span><%= _('Tags: ') + article.tags.join(', ') if !article.tags.empty? %></span> | 9 | <br /><span><%= _('Tags: ') + article.tags.join(', ') if !article.tags.empty? %></span> |
app/views/search/_product.rhtml
@@ -13,7 +13,8 @@ | @@ -13,7 +13,8 @@ | ||
13 | </div> | 13 | </div> |
14 | <div class="product-description"> | 14 | <div class="product-description"> |
15 | <% if product.description %> | 15 | <% if product.description %> |
16 | - <span class="product-item-topic"><%= _('DESCRIPTION') %> </span><%= product.description %> | 16 | + <% desc_stripped = strip_tags(product.description) %> |
17 | + <span class="product-item-topic"><%= _('DESCRIPTION') %> </span><%= excerpt(desc_stripped, desc_stripped.first(3), 100) %> | ||
17 | <% end %> | 18 | <% end %> |
18 | </div> | 19 | </div> |
19 | </div> | 20 | </div> |