Before Rails 6,
keys with the _html suffix in the language locale files
are automatically marked as HTML safe.
These HTML safe keys do not get escaped when used in the views.
Once rendered, this page looks like this.
This way of marking translations as HTML safe
adding _html suffix to the keys
does not work as expected
the value is an array.
The rendered page escapes the unsafe HTML
rendering the array of translations
for the key .sections.services.list_html
even though that key has the _html suffix.
to manually mark all the translations
in that array as HTML safe
using the methods such as #raw or #html_safe.
Arrays of translations are trusted as HTML safe by using the ‘_html’ suffix in Rails 6
In Rails 6,
the unexpected behavior
not marking an array of translations as HTML safe
even though the key of that array has the _html suffix
We can see above that
we no longer need to manually mark the translations as HTML safe
for the key .sections.services.title_html
using the methods such as #raw or #html_safe
since that key has the _html suffix.