TT comments broken on multiple lines will lead to artifacts in the po files. Better to use a format that keeps them on one line or enclose each line in [%% ... %%] koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt:581 [%% item.object.itemnotes.replace('\n','
This line? 594 <td><div class="itemnotes">[% item.object.itemnotes.replace('\n','<br />') | $raw %]</div></td>
(In reply to Katrin Fischer from comment #0) > [%% item.object.itemnotes.replace('\n',' I don't see this string anywhere but in Koha-staff-prog.pot
(In reply to Owen Leonard from comment #2) > I don't see this string anywhere but in Koha-staff-prog.pot Sorry, scratch that, I was on the wrong branch
Created attachment 151677 [details] [review] Bug 33780: Use TT html_line_break filter to format itemnotes This patch removes a snippet of TT code which was causing problems with translation. Putting HTML inside a TT replace() method resulted in TT code being processed for translation. To test, apply the patch and edit an item record's public note field so that it contains line breaks ("\n"). Since the notes field in the editor is a text field, you might want to update the record in the database: update items set itemnotes = "Line 1\nLine 2\n\n\n\nLine 3" where biblionumber = 228; View the bibliographic details page in the staff interface. The note in the holdings table should have the correct line breaks. If you inspect the HTML you should see that each "\n" has been replaced with "<br />"
I am not sure this is about what was reporting Katrin.
This is an improvement so I will sign-off. Will let Katrin decide if this was what she initially reported.
Created attachment 151703 [details] [review] Bug 33780: Use TT html_line_break filter to format itemnotes This patch removes a snippet of TT code which was causing problems with translation. Putting HTML inside a TT replace() method resulted in TT code being processed for translation. To test, apply the patch and edit an item record's public note field so that it contains line breaks ("\n"). Since the notes field in the editor is a text field, you might want to update the record in the database: update items set itemnotes = "Line 1\nLine 2\n\n\n\nLine 3" where biblionumber = 228; View the bibliographic details page in the staff interface. The note in the holdings table should have the correct line breaks. If you inspect the HTML you should see that each "\n" has been replaced with "<br />" Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
The effect of the patch is different to the issue description. Note that before the patch, you could include HTML in the item note field. After the patch, the HTML is escaped.