[Bug 21770] New: t::lib::QA::TemplateFilters should allow html_entity in href
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21770 Bug ID: 21770 Summary: t::lib::QA::TemplateFilters should allow html_entity in href Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Test Suite Assignee: chris@bigballofwax.co.nz Reporter: tomascohen@gmail.com QA Contact: testopia@bugs.koha-community.org In some cases the href is used in JavaScript to build UI components and shouldn't be URI encoded. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21770 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21770 --- Comment #1 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 81980 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=81980&action=edit Bug 21770: t::lib::QA::TemplateFilters should allow html_entity in href Bug 21740 highlighted the situation in which the href is not a link (and thus requiring to be URI/URL encoded). This was fixed on the bug, but the xt/find-missing-filters.t tests fail on it, becuase they enforce uri filters on href without exceptions. This patch adds the exception for those href's starting with '#' To test: - Run: $ kshell k$ prove xt/find-missing-filters.t => FAIL: Tests fail - Apply this patch - Run: k$ prove xt/find-missing-filters.t => SUCCESS: Tests pass! - Sign off :-D -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21770 --- Comment #2 from Tomás Cohen Arazi <tomascohen@gmail.com> --- This patch is submitted to highlight the issue. A better approach can be done, though. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21770 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |21740 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21740 [Bug 21740] Fixed-lenght fields show _ instead @ when editing subfields -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21770 --- Comment #3 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 81983 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=81983&action=edit Bug 21770: Add tests for html_entity -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21770 --- Comment #4 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 81984 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=81984&action=edit Bug 21770: Allow html_entity for href We certainly should not expect this filter to be used much for href, but we have one occurrence that needs it. Test plan: t/template_filters.t and xt/find-missing-filters.t must return green -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21770 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org Attachment #81984|Bug 21770: Allow |[ALTERNATIVE-PATCH] Bug description|html_entity for href |21770: Allow html_entity | |for href -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21770 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21770 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #81980|0 |1 is obsolete| | Attachment #81983|0 |1 is obsolete| | Attachment #81984|0 |1 is obsolete| | --- Comment #5 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 82008 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=82008&action=edit Bug 21770: t::lib::QA::TemplateFilters should allow html_entity in href Bug 21740 highlighted the situation in which the href is not a link (and thus requiring to be URI/URL encoded). This was fixed on the bug, but the xt/find-missing-filters.t tests fail on it, becuase they enforce uri filters on href without exceptions. This patch adds the exception for those href's starting with '#' To test: - Run: $ kshell k$ prove xt/find-missing-filters.t => FAIL: Tests fail - Apply this patch - Run: k$ prove xt/find-missing-filters.t => SUCCESS: Tests pass! - Sign off :-D Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21770 --- Comment #6 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 82009 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=82009&action=edit Bug 21770: Add tests for html_entity Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21770 --- Comment #7 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 82010 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=82010&action=edit Bug 21770: Allow html_entity for href We certainly should not expect this filter to be used much for href, but we have one occurrence that needs it. Test plan: t/template_filters.t and xt/find-missing-filters.t must return green Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21770 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #82010|Bug 21770: Allow |[ALTERNATIVE-PATCH] Bug description|html_entity for href |21770: Allow html_entity | |for href -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21770 --- Comment #8 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- The 3 patches should not be picked, the last one is an alternative patch for the first one. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21770 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=21731 CC| |josef.moravec@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21770 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21770 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #82008|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21770 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #82009|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21770 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #82010|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21770 --- Comment #9 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 82041 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=82041&action=edit Bug 21770: Add tests for html_entity Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21770 --- Comment #10 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 82042 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=82042&action=edit Bug 21770: Allow html_entity for href We certainly should not expect this filter to be used much for href, but we have one occurrence that needs it. Test plan: t/template_filters.t and xt/find-missing-filters.t must return green Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21770 --- Comment #11 from Tomás Cohen Arazi <tomascohen@gmail.com> --- I liked my patch because it was more clear to me. But as the author for the tests, I prefer Jonathan's approach. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21770 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|chris@bigballofwax.co.nz |jonathan.druart@bugs.koha-c | |ommunity.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21770 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |tomascohen@gmail.com |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21770 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |nick@bywatersolutions.com --- Comment #12 from Nick Clemens <nick@bywatersolutions.com> --- Awesome work all! Pushed to master for 18.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21770 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |21393 CC| |martin.renvoize@ptfs-europe | |.com Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21393 [Bug 21393] Make template filter checks code reusable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21770 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |RESOLVED Resolution|--- |FIXED --- Comment #13 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Bugfix on enhancement bug not in 18.05.x series. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21770 Bug 21770 depends on bug 21740, which changed state. Bug 21740 Summary: Fixed-length fields show _ instead of @ when editing subfields https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21740 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Stable |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org