OPACSearchForTitleIn is a syspref used to add links as "more searches" in OPAC record detail page. The links can contain vars depending on record values like title, ISBN, ... Thoses values must be URL-escaped because they can contain special characters that will brake URL and/or HTML.
Created attachment 14921 [details] [review] Proposed patch See commit message
Created attachment 15019 [details] [review] Bug 9504: URL escape in OPAC more searches OPACSearchForTitleIn is a syspref used to add links as "more searches" in OPAC record detail page. The links can contain vars depending on record values like title, ISBN, ... Thoses values must be URL-escaped because they can contain special characters that will brake URL and/or HTML. This patch add a method C4::Output::parametrized_url() that replaces vars in URL usign escape and UTF-8 encoding. Test plan : - Define in OPACSearchForTitleIn a link with all possible vars : TITLE, AUTHOR, ISBN, ISSN, CONTROLNUMBER, BIBLIONUMBER - Edit a record to add special characters in title : ", &, ? ... - Go to OPAC detail pages of this record => Check that URL is well encoded => Click on link to check the term is well encoded (diacritical characters, ...) Signed-off-by: Liz Rea <liz@catalyst.net.nz> Nice test plan, thanks! Verified bug and fix - both look good.
Created attachment 16446 [details] [review] Bug 9504: URL escape in OPAC more searches OPACSearchForTitleIn is a syspref used to add links as "more searches" in OPAC record detail page. The links can contain vars depending on record values like title, ISBN, ... Thoses values must be URL-escaped because they can contain special characters that will brake URL and/or HTML. This patch add a method C4::Output::parametrized_url() that replaces vars in URL usign escape and UTF-8 encoding. Test plan : - Define in OPACSearchForTitleIn a link with all possible vars : TITLE, AUTHOR, ISBN, ISSN, CONTROLNUMBER, BIBLIONUMBER - Edit a record to add special characters in title : ", &, ? ... - Go to OPAC detail pages of this record => Check that URL is well encoded => Click on link to check the term is well encoded (diacritical characters, ...) Signed-off-by: Liz Rea <liz@catalyst.net.nz> Nice test plan, thanks! Verified bug and fix - both look good. Signed-off-by: Mason James <mtj@kohaaloha.com>
> Signed-off-by: Mason James <mtj@kohaaloha.com> passing QA, patch tested and works well testing 1 commit(s) (applied to 2f3cf47 'Merge branch 'bug_8979' into 3.12-mas')
This patch has been pushed to master.
Pushed to 3.10.x will be in 3.10.5