In some cases the href is used in JavaScript to build UI components and shouldn't be URI encoded.
Created attachment 81980 [details] [review] 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
This patch is submitted to highlight the issue. A better approach can be done, though.
Created attachment 81983 [details] [review] Bug 21770: Add tests for html_entity
Created attachment 81984 [details] [review] [ALTERNATIVE-PATCH] 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
Created attachment 82008 [details] [review] 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>
Created attachment 82009 [details] [review] Bug 21770: Add tests for html_entity Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 82010 [details] [review] [ALTERNATIVE-PATCH] 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>
The 3 patches should not be picked, the last one is an alternative patch for the first one.
Created attachment 82041 [details] [review] 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>
Created attachment 82042 [details] [review] 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>
I liked my patch because it was more clear to me. But as the author for the tests, I prefer Jonathan's approach.
Awesome work all! Pushed to master for 18.11
Bugfix on enhancement bug not in 18.05.x series.