[Koha-bugs] [Bug 12076] xt/tt_valid.t can miss an invalid construct
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Fri Apr 11 20:57:27 CEST 2014
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12076
--- Comment #3 from Galen Charlton <gmcharlt at gmail.com> ---
Created attachment 27041
-->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=27041&action=edit
Bug 12076: better detect an untranslatable template construct
Per bug 6458, template constructs of the form
<li [% IF (foo) %]selected="selected"[% END %]...
are forbidden as they can cause problems with translated templates.
However, the tt_valid.t test currently doesn't catch the variation
where '-' is used to suppress extra whitespace:
<li [%- IF (foo) -%]selected="selected"[%- END -%]...
This patch corrects the issue.
To test:
[1] Temporarily add the following line to a template file:
<li [%- IF a -%]a="a"[%- END -%] />
[2] Run prove -v xt/tt_valid.t. Note that no error is reported.
[3] Apply the patch, and rerun the tt_valid.t test. This time,
an error should be reported.
Signed-off-by: Galen Charlton <gmc at esilibrary.com>
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list