Bugzilla – Attachment 79615 Details for
Bug 21454
Price filtered variables should not need to be html filtered
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21454: Do not require html filter on Price
Bug-21454-Do-not-require-html-filter-on-Price.patch (text/plain), 1.28 KB, created by
Jonathan Druart
on 2018-09-29 16:14:19 UTC
(
hide
)
Description:
Bug 21454: Do not require html filter on Price
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2018-09-29 16:14:19 UTC
Size:
1.28 KB
patch
obsolete
>From 8da36bd2d23f863701981e5684811809851af287 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Sat, 29 Sep 2018 13:10:19 -0300 >Subject: [PATCH] Bug 21454: Do not require html filter on Price > >Test plan: >- Apply first patch >- Confirm that tests is failing (t/template_filters.t) >- Apply second patch >- Confirm that tests return green >- Apply last patch >- Confirm that prices are displayed correctly > >QA step: >Edit a template and add the following 2 lines: >[% SET p = '<script>alert("foo");</script>' %] >[% x | $Price %] >=> Display '0.00' >--- > t/lib/QA/TemplateFilters.pm | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >diff --git a/t/lib/QA/TemplateFilters.pm b/t/lib/QA/TemplateFilters.pm >index 4b4a3d2835..2aa94b7dfb 100644 >--- a/t/lib/QA/TemplateFilters.pm >+++ b/t/lib/QA/TemplateFilters.pm >@@ -65,7 +65,8 @@ sub missing_filters { > next if grep { $tt_block =~ $_ } @tt_directives; > > next >- if $tt_block =~ m{\s?\|\s?\$KohaDates\s?$} >+ if $tt_block =~ m{\s?\|\s?\$KohaDates\s?$} >+ or $tt_block =~ m{\s?\|\s?\$Price\s?$} > ; # We could escape it but should be safe > next if $tt_block =~ m{^\#}; # Is a comment, skip it > >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 21454
:
79614
|
79615
|
79616
|
79703
|
79704
|
79705