AntonKhorev left a comment (openstreetmap/openstreetmap-website#5121)
> @AntonKhorev Unfortunately, from what I've tested, we can't truncate after
> sanitize/linkify, because truncation changes HTML code and Ruby on Rails
> doesn't render it if it is not sanitized/linkified once more.
It's rendered if you add `html_safe`, like `sanitize` does:
```ruby
def to_truncated_html(truncation_length = nil)
truncate_html(to_html, truncation_length).to_s.html_safe
end
```
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5121#issuecomment-2780712144
You are receiving this because you are subscribed to this thread.
Message ID:
<openstreetmap/openstreetmap-website/pull/5121/c2780712...@github.com>
_______________________________________________
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev