Summary: | Advanced Cataloguer editor fails if the target contains an apostrophe in the name | ||
---|---|---|---|
Product: | Koha | Reporter: | Andrew Isherwood <bugzilla> |
Component: | Cataloging | Assignee: | Andrew Isherwood <bugzilla> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | andrew, caroline.cyr-la-rose, fridolin.somers, m.de.rooy, victor |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
21.05.00,20.11.01,20.05.07
|
|
Circulation function: | |||
Attachments: |
Bug 22243: Fix unescaped apostrophe in Z target
Bug 22243: Fix unescaped apostrophe in Z target Bug 22243: Fix unescaped apostrophe in Z target Bug 22243: Fix unescaped apostrophe in Z target |
Description
Andrew Isherwood
2019-01-31 09:38:38 UTC
Created attachment 84566 [details] [review] Bug 22243: Fix unescaped apostrophe in Z target This patch escapes apostrophes in the z39.50 target name prior to them being embedded in the template. To test: - Create a z39.50 target containing an apostrophe in the title - Note that the Advanced Cataloguer editor does not load - Apply the patch - TEST: Note that the Advanced Cataloguer editor does load This patch doesn't work for me. What about doing this? name: '[% server.servername | html_entity %]', It looks like the html_entity filter is what we want here: http://template-toolkit.org/docs/manual/Filters.html#section_html_entity Created attachment 114499 [details] [review] Bug 22243: Fix unescaped apostrophe in Z target This patch escapes apostrophes in the z39.50 target name prior to them being embedded in the template. To test: - Create a z39.50 target containing an apostrophe in the title - Note that the Advanced Cataloguer editor does not load - Apply the patch - TEST: Note that the Advanced Cataloguer editor does load Created attachment 114502 [details] [review] Bug 22243: Fix unescaped apostrophe in Z target This patch escapes apostrophes in the z39.50 target name prior to them being embedded in the template. To test: - Create a z39.50 target containing an apostrophe in the title - Note that the Advanced Cataloguer editor does not load - Apply the patch - TEST: Note that the Advanced Cataloguer editor does load Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Created attachment 114561 [details] [review] Bug 22243: Fix unescaped apostrophe in Z target This patch escapes apostrophes in the z39.50 target name prior to them being embedded in the template. To test: - Create a z39.50 target containing an apostrophe in the title - Note that the Advanced Cataloguer editor does not load - Apply the patch - TEST: Note that the Advanced Cataloguer editor does load Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Pushed to master for 21.05, thanks to everybody involved! Not sure this was the best way to fix. There are only a few places with 'html_entity' filter. Other places use double-quotes for JS strings and html TT filter replaces double-quotes with " Pushed to 20.11.x for 20.11.01 Pushed to 20.05.x for 20.05.07 Not backported to oldoldstable (19.11.x). Feel free to ask if it's needed. |