| Summary: | Bad fields within comments in a HTML notice still cause a crash | ||
|---|---|---|---|
| Product: | Koha | Reporter: | Marcel de Rooy <m.de.rooy> |
| Component: | Notices | Assignee: | Bugs List <koha-bugs> |
| Status: | CLOSED INVALID | QA Contact: | Testopia <testopia> |
| Severity: | normal | ||
| Priority: | P5 - low | ||
| Version: | Main | ||
| Hardware: | All | ||
| OS: | All | ||
| GIT URL: | Initiative type: | --- | |
| Sponsorship status: | --- | Comma delimited list of Sponsors: | |
| Crowdfunding goal: | 0 | Patch complexity: | --- |
| Documentation contact: | Documentation submission: | ||
| Text to go in the release notes: | Version(s) released in: | ||
| Circulation function: | |||
|
Description
Marcel de Rooy
2022-03-22 12:31:54 UTC
(In reply to Marcel de Rooy from comment #0) > Running Print slip from within circ/article-requests caused a crash like: Yes it was article_requests.toc_request :) (In reply to Marcel de Rooy from comment #1) > (In reply to Marcel de Rooy from comment #0) > > Running Print slip from within circ/article-requests caused a crash like: > > Yes it was article_requests.toc_request :) And not present in that database. But it just serves as an example that fields within comments are evaluated. As a side note (lowering the severity a bit): You could also try [%# bad stuff %], this works at least partially as long as the bad stuff does not contain %] which would end the comment. And for fun, as a crazy workaround, you could replace an ending %] by %][%# resulting in for instance: [%# <p>TOC: [% IF article_request.toc_request %][%#<strong>Include TOC</strong>[% ELSE %][%#No[% END %] It works, but serves as a 'good' example of a bad workaround. Should we call this a Template Toolkit bug or what? I think if you use HTML comments, it will still get parsed by TT and that is intentional. It allows you to put things into the templates that are only visible in source, like maybe our TEMPLATE FILE comment in the OPAC. You would have to use a TT comment if you didn't want it to show up in the code/being parsed at all. I believe this is not a bug, but working as intended. |