Bug 37232 - Quotation mark in title does not show correctly in page title
Summary: Quotation mark in title does not show correctly in page title
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on: 33911
Blocks:
  Show dependency treegraph
 
Reported: 2024-07-02 13:42 UTC by Janusz Kaczmarek
Modified: 2024-07-02 14:44 UTC (History)
0 users

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Janusz Kaczmarek 2024-07-02 13:42:36 UTC
If a title of a book starts with (or contains) a quotation mark, it will be displayed in a wrong way in the browser page title (in librarian interface).

This is because the title string, after bug 33911, is being | html filtered twice: for the first time inside biblio-title-head.inc, and then as the result of tx MACRO:

" | html ==> " | html ==> "

To see the problem, search in ktd, standard data, for "Páipéir bhána agus páipéir bhreaca."  In title of the page you will see: 

Details for "Páipéir bhána...

instead:

Details for "Páipéir bhána...
Comment 1 Owen Leonard 2024-07-02 14:10:21 UTC
It would probably make the qa tool unhappy, but we could just remove the second html filter:

 [% tx("Details for {title}", { title = title_in_title }) %]

Am I missing a danger here?
Comment 2 Janusz Kaczmarek 2024-07-02 14:44:41 UTC
(In reply to Owen Leonard from comment #1)
> Am I missing a danger here?

This is exactly the question I was asking myself.  Is it possible that tx introduces some dangerous characters?  No idea...