Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Prevent problematic characters after slice

  • Loading branch information...
commit b2ad74c3bb3ff353ddbb098ee0c27726222c8136 1 parent af7863b
Alex Bredariol Grilo authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 app/models/answer.rb
View
4 app/models/answer.rb
@@ -66,8 +66,8 @@ def title(options = {})
end
def summary
- truncate(markdown2txt(body).
- slice((title(:truncated => true).size - 3)..-1).
+ truncate(markdown2txt(body).mb_chars.
+ slice((title(:truncated => true).mb_chars.size - 3)..-1).
to_s.
insert(0, ''),
:length => SearchResult::SUMMARY_SIZE,
Please sign in to comment.
Something went wrong with that request. Please try again.