Bugzilla – Attachment 98962 Details for
Bug 24110
Template vars are incorrectly html filtered when dumped
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24110: Do not html filter TT vars when dumped
Bug-24110-Do-not-html-filter-TT-vars-when-dumped.patch (text/plain), 2.54 KB, created by
Bernardo Gonzalez Kriegel
on 2020-02-14 15:24:49 UTC
(
hide
)
Description:
Bug 24110: Do not html filter TT vars when dumped
Filename:
MIME Type:
Creator:
Bernardo Gonzalez Kriegel
Created:
2020-02-14 15:24:49 UTC
Size:
2.54 KB
patch
obsolete
>From 375a3de522df9557b0ef65f221bdc50f17489d44 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 26 Nov 2019 09:27:21 +0100 >Subject: [PATCH] Bug 24110: Do not html filter TT vars when dumped > >DumpTemplateVarsIntranet and DumpTemplateVarsOpac are devs tools to >display the variables sent to the template. They should not be filtered >otherwise it's getting completed to read. > >For instance: $VAR1 = { var => val } > >Test plan: >Turn DumpTemplateVarsIntranet on >Go to the main page >Show the source of the page >Confirm that the variable are displayed as it and not filtered > >Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> >Confirmed variable is not filtered. >Fixed a little error on opac file (changed Use -> USE) >No other errors >--- > koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-open.inc | 3 ++- > koha-tmpl/opac-tmpl/bootstrap/en/includes/doc-head-open.inc | 3 ++- > 2 files changed, 4 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-open.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-open.inc >index bfa90f461a..0ccd70561d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-open.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-open.inc >@@ -2,6 +2,7 @@ > <!-- TEMPLATE FILE: [% template.name.split('/').last | html %] --> > > [% USE Koha %] >+[% USE raw %] > [% IF Koha.Preference('DumpTemplateVarsIntranet') %] > [% TRY %] > [% USE Stash %] >@@ -9,7 +10,7 @@ > <!-- > [% FILTER replace('<!--', '<!- -') %] > [% FILTER replace('-->', '- ->') %] >- [% Dumper.dump( Stash.stash() ) | html %] >+ [% Dumper.dump( Stash.stash() ) | $raw %] > [% END %] > [% END %] > --> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/doc-head-open.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/doc-head-open.inc >index 292b7251c4..75ab46dfb6 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/doc-head-open.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/doc-head-open.inc >@@ -1,6 +1,7 @@ > <!DOCTYPE html> > <!-- TEMPLATE FILE: [% template.name.split('/').last | html %] --> > >+[% USE raw %] > [% USE Koha %] > [% IF Koha.Preference('DumpTemplateVarsOpac') %] > [% TRY %] >@@ -9,7 +10,7 @@ > <!-- > [% FILTER replace('<!--', '<!- -') %] > [% FILTER replace('-->', '- ->') %] >- [% Dumper.dump( Stash.stash() ) | html %] >+ [% Dumper.dump( Stash.stash() ) | $raw %] > [% END %] > [% END %] > --> >-- >2.17.1
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 24110
:
95809
|
98962
|
99135