When I enter the following text into the Email template for 'HOLD_SLIP' in Home › Tools › Notices & Slips › Modify notice... <div style='max-width: 4in;'> <h3><<borrowers.surname>>, <<borrowers.firstname>></h3><br /> <<borrowers.streetnumber>> <<borrowers.address>><br /> <<borrowers.address2>><br /> <<borrowers.city>>, <<borrowers.state>> <<borrowers.zipcode>><br /> <br /> <br /> <img src="/cgi-bin/koha/svc/barcode?barcode=<<borrowers.cardnumber>>&type=Industrial2of5¬ext=1"> Then save, the final line of text renders as <img src="/cgi-bin/koha/svc/barcode?barcode=<<borrowers.cardnumber>>&type=Industrial2of5¬ext=1"> When I navigate back to the modify notice page for HOLD_SLIP. The text is correct in letter.content. I've replicated the issue in 17.05 and 17.11 using both firefox and chrome. Note that simply pasting the last line of text into an existing notice doesn't cause the display issue.
Created attachment 75022 [details] [review] Bug 20685: Escape letter template content in textarea Test plan: enter the following text into the Email template for 'HOLD_SLIP' in Home › Tools › Notices & Slips › Modify notice <div style='max-width: 4in;'> <h3><<borrowers.surname>>, <<borrowers.firstname>></h3><br /> <<borrowers.streetnumber>> <<borrowers.address>><br /> <<borrowers.address2>><br /> <<borrowers.city>>, <<borrowers.state>> <<borrowers.zipcode>><br /> <br /> <br /> <img src="/cgi-bin/koha/svc/barcode?barcode=<<borrowers.cardnumber>>&type=Industrial2of5¬ext=1"> Edit it again Without this patch you will get: <img src="/cgi-bin/koha/svc/barcode?barcode=<<borrowers.cardnumber>>&type=Industrial2of5¬ext=1">
Created attachment 75039 [details] [review] Bug 20685: Escape letter template content in textarea Test plan: enter the following text into the Email template for 'HOLD_SLIP' in Home › Tools › Notices & Slips › Modify notice <div style='max-width: 4in;'> <h3><<borrowers.surname>>, <<borrowers.firstname>></h3><br /> <<borrowers.streetnumber>> <<borrowers.address>><br /> <<borrowers.address2>><br /> <<borrowers.city>>, <<borrowers.state>> <<borrowers.zipcode>><br /> <br /> <br /> <img src="/cgi-bin/koha/svc/barcode?barcode=<<borrowers.cardnumber>>&type=Industrial2of5¬ext=1"> Edit it again Without this patch you will get: <img src="/cgi-bin/koha/svc/barcode?barcode=<<borrowers.cardnumber>>&type=Industrial2of5¬ext=1"> Signed-off-by: Barton Chittenden <barton@bywatersolutions.com>
Created attachment 75046 [details] [review] Bug 20685: Escape letter template content in textarea Test plan: enter the following text into the Email template for 'HOLD_SLIP' in Home › Tools › Notices & Slips › Modify notice <div style='max-width: 4in;'> <h3><<borrowers.surname>>, <<borrowers.firstname>></h3><br /> <<borrowers.streetnumber>> <<borrowers.address>><br /> <<borrowers.address2>><br /> <<borrowers.city>>, <<borrowers.state>> <<borrowers.zipcode>><br /> <br /> <br /> <img src="/cgi-bin/koha/svc/barcode?barcode=<<borrowers.cardnumber>>&type=Industrial2of5¬ext=1"> Edit it again Without this patch you will get: <img src="/cgi-bin/koha/svc/barcode?barcode=<<borrowers.cardnumber>>&type=Industrial2of5¬ext=1"> Signed-off-by: Barton Chittenden <barton@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Pushed to master for 18.05, thanks to everybody involved!
Can we get this backported? I'm editing the slip in question, and it's causing all sorts of inconvenience.
Pushed to 17.11.x for 17.11.07