i can't seem to find a way to escape whole html block, if it is even possible.
Here is what i am trying to do:
%table
%tr
%th{rowspan: "2"}= t("public.home.graphic_title_payment").html_safe
%th.datefield{rowspan: "2"}= t("public.home.graphic_title_dates").html_safe
%th{colspan: "3"}= t("public.home.graphic_title_pay_group").html_safe
%th{rowspan: "2"}= t("public.home.graphic_title_unpaid").html_safe
Altho i dont like purring .html_safe
at the end of every string. Is there a way i could maybe put some kind of indicator that all %tr
needs to be html_safe??
Thanks :)
Rails escapes ERB output by default. So the best thing would probably be to create a new helper method to run the I18n translation and mark it as safe. So perhaps:
Then: