[Bug 7618] New: HTML special characters break result table and incorrectly show SQL in Run This Report
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7618 Bug #: 7618 Summary: HTML special characters break result table and incorrectly show SQL in Run This Report Classification: Unclassified Change sponsored?: --- Product: Koha Version: unspecified Platform: All OS/Version: All Status: ASSIGNED Severity: minor Priority: P5 - low Component: Reports AssignedTo: dcook@prosentient.com.au ReportedBy: dcook@prosentient.com.au QAContact: koha.sekjal@gmail.com The HTML special characters (often angle brackets in the case of older marcxml look-ups) in guided_reports_start.tmpl need to be escaped, so that the SQL displays properly and so that the results table properly forms. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7618 --- Comment #1 from David Cook <dcook@prosentient.com.au> 2012-03-02 00:13:13 UTC --- Created attachment 7976 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=7976 Bug 7618 HTML Escaped SQL It's just a simple change to the intranet template for the Guided Reports in Koha 3.2. If you look at the template, the SQL is also displayed in a hidden field which is already HTML special character escaped. I just copied that format, and voila it worked. The fix for Koha 3.6+ could be achieved similarly. Rationale: I had noticed that any SQL report with angle brackets (< >) wouldn't display properly when running a report, since the browser would interpret it as HTML. Besides being an incorrect representation of the SQL used in the report, it also had the tendency of breaking the result table, which often meant that all the results were a single string flowing out of the SQL. It's quite an uncommon problem overall, but it's a re-occurring issue with reports using the older method of retrieving values from marcxml fields. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7618 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|unspecified |rel_3_2 -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7618 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7618 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA CC| |jcamins@cpbibliography.com --- Comment #2 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- This patch is for Koha 3.2 which is no longer maintained by the community. Also, reports are often written which include links (using <a href=...> concatenated into the results). This patch would break those links. Marking failed QA. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7618 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |In Discussion --- Comment #3 from David Cook <dcook@prosentient.com.au> --- I'm not sure that I understand why/how Koha 3.2 wouldn't be supported by the community (am I not a member of the community?), since the branch is still available via the git. Also, it appears that you are incorrect about the patch breaking the links in the report. If you look at guided_reports_start.tmpl, you'll see that I'm just escaping the HTML characters in the SQL that is displayed above the results. The HTML in the actual results still works perfectly fine. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7618 --- Comment #4 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- David, Sorry, I misunderstood what it did! It doesn't apply, so I wasn't able to test it. What I meant by "is no longer maintained" is that no one has stepped forward to act as release maintainer for Koha 3.2, so there will be no further releases in 3.2.x (unless you want to volunteer, which would be awesome!). Regards, Jared -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7618 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |chris@bigballofwax.co.nz --- Comment #5 from Chris Cormack <chris@bigballofwax.co.nz> --- (In reply to comment #3)
I'm not sure that I understand why/how Koha 3.2 wouldn't be supported by the community (am I not a member of the community?), since the branch is still available via the git.
Not supported, maintained. It's still available on git, but has been end of lifed. There will be no more 3.2.x releases ever. The 2 stable branches are 3.4.x and 3.6.x .. the current stable releases are 3.4.7 and 3.6.4. The last release for 3.2.x was 3.2.11 3 months ago. When 3.8.0 is released in april, the 3.4.x branch will be end of lifed also. We keep 2 stable branches and 1 development branch running.
Also, it appears that you are incorrect about the patch breaking the links in the report. If you look at guided_reports_start.tmpl, you'll see that I'm just escaping the HTML characters in the SQL that is displayed above the results. The HTML in the actual results still works perfectly fine.
There are no longer any .tmpl files in Koha, since 3.4.0 we switched to template toolkit. This is a major reason this patch will not apply for master. Patches should be written to be applied to master, then cherry-picked by the release maintainer to the appropriate stable branch. If this patch was rewritten to apply to the master (development branch) then it could be backported to 3.4.x and 3.6.x and be in the next releases of those. As well as being in the next feature release 3.8.0. Hope this clears it up. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7618 --- Comment #6 from David Cook <dcook@prosentient.com.au> --- (In reply to comment #5)
(In reply to comment #3)
I'm not sure that I understand why/how Koha 3.2 wouldn't be supported by the community (am I not a member of the community?), since the branch is still available via the git.
Not supported, maintained. It's still available on git, but has been end of lifed. There will be no more 3.2.x releases ever.
The 2 stable branches are 3.4.x and 3.6.x .. the current stable releases are 3.4.7 and 3.6.4. The last release for 3.2.x was 3.2.11 3 months ago.
When 3.8.0 is released in april, the 3.4.x branch will be end of lifed also.
We keep 2 stable branches and 1 development branch running.
Also, it appears that you are incorrect about the patch breaking the links in the report. If you look at guided_reports_start.tmpl, you'll see that I'm just escaping the HTML characters in the SQL that is displayed above the results. The HTML in the actual results still works perfectly fine.
There are no longer any .tmpl files in Koha, since 3.4.0 we switched to template toolkit. This is a major reason this patch will not apply for master. Patches should be written to be applied to master, then cherry-picked by the release maintainer to the appropriate stable branch.
If this patch was rewritten to apply to the master (development branch) then it could be backported to 3.4.x and 3.6.x and be in the next releases of those. As well as being in the next feature release 3.8.0.
Hope this clears it up.
Thanks Jared and Chris. That really does clear things up a lot. I've taken a look at the master code, and the fix looks conceptually the same, despite the change in template management. Should I upload a new patch for the master branch on this same bug (after changing the version details)? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7618 --- Comment #7 from Chris Cormack <chris@bigballofwax.co.nz> --- (In reply to comment #6)
I've taken a look at the master code, and the fix looks conceptually the same, despite the change in template management. Should I upload a new patch for the master branch on this same bug (after changing the version details)?
That would be perfect in TT to filter you would do | html eg [% sql | html %] -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7618 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #7976|0 |1 is obsolete| | --- Comment #8 from David Cook <dcook@prosentient.com.au> --- Created attachment 8192 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=8192&action=edit Bug 7618 HTML Escaped SQL (master) Here is the the patch for escaping the HTML in the SQL that displays above report results for instances of Koha using the template toolkit. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7618 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Needs Signoff Version|rel_3_2 |master -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7618 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #8192|0 |1 is obsolete| | --- Comment #9 from Chris Cormack <chris@bigballofwax.co.nz> --- Created attachment 8193 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=8193&action=edit Bug 7618 Escape HTML special characters for SQL displayed above results in Report module Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7618 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off --- Comment #10 from Chris Cormack <chris@bigballofwax.co.nz> --- Small change, works well, signed off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7618 Ian Walls <koha.sekjal@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #11 from Ian Walls <koha.sekjal@gmail.com> --- Just adds an html filter to the SQL. Safe and easy, marking as Passed QA. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7618 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |paul.poulain@biblibre.com Version|master |rel_3_6 --- Comment #12 from Paul Poulain <paul.poulain@biblibre.com> --- Patch pushed, and welcomed David, you're the 178th dev to have a patch pushed ! (added you on about page) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7618 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable --- Comment #13 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- This patch will be in 3.6.5. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org