[Bug 21875] New: Handling subject line in Letters.pm
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21875 Bug ID: 21875 Summary: Handling subject line in Letters.pm Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Notices Assignee: koha-bugs@lists.koha-community.org Reporter: m.de.rooy@rijksmuseum.nl QA Contact: testopia@bugs.koha-community.org See bug 21874 for discussion -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21875 --- Comment #1 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 82601 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=82601&action=edit Bug 21875: Handling subject line in Letters.pm Work in progress -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21875 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de, | |martin.renvoize@ptfs-europe | |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21875 --- Comment #2 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 82611 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=82611&action=edit test assumptions -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21875 --- Comment #3 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Martin Renvoize from comment #2)
Created attachment 82611 [details] test assumptions
Thanks for trying. You prove that encode(decode(encode))=encode and encode(encode)) != encode. This does not justify keeping a decode where it does not belong. The subject field coming from the database is plain text and should not be handled as a mime header. Even if it contained mime encoded text [highly theoretical only], it should not be seen as mime but as plain text and displayed as-is. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21875 --- Comment #4 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 82840 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=82840&action=edit Bug 21875: Handling subject line in Letters.pm -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21875 --- Comment #5 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Test plan (Bugzilla only to prevent git bz encoding stuff): [1] Make Koha send a queue message with a plain ASCII subject line. Verify the subject line at the receiving side. Possible in many ways. Here is one: Enable list sharing and send a share invitation on a list with a plain ASCII text name like "L2". [2] Now send a subject line with some Latin chars. Verify. Rename your list L2 from step 1 to L2áéò. Send another share invitation. [3] Now send a subject line with some 'real' Unicode chars. Verify. Rename L2áéò to L2áéò癱覂. Repeat the invite. [4] Now include MIME encoding in the list name. (To make Martin happy ;) Verify. Rename L2áéò癱覂 to =?UTF-8?B?IHBlcmwgSsO8?= (include the equal signs) Since I gave the list a strange and ugly name, I would like to see that name in the subject line. (You will also see it in the message body.) Note: Without this patch the subject line is decoded to "Share list perl Jü". This is wrong, because it is not my list name! Bonus: Try some other email address/mail program too. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21875 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21875 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #82601|0 |1 is obsolete| | Attachment #82840|0 |1 is obsolete| | --- Comment #6 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 82841 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=82841&action=edit Bug 21875: Handling subject line in Letters.pm The variable name $utf8 is very misleading: it contains MIME-Header encoding. $message->{subject} comes from the database and is in perl internal format; it should NOT be decoded as a MIME-Header. After encoding to MIME-Header, previously another (useless) encoding to UTF-8 was done. Since the string is plain ASCII, this is useless and theoretically wrong. We should stay in MIME-Header. Test plan: See Bugzilla comment5. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21875 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|Notices |Architecture, internals, | |and plumbing Assignee|koha-bugs@lists.koha-commun |m.de.rooy@rijksmuseum.nl |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21875 --- Comment #7 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Martin, Please check the fourth step in the test plan on comment5. Hope it does better explain my point of view. Thanks, Marcel -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21875 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org, | |tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21875 --- Comment #8 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Original code comes from commit 7c08d7c81edf6b25d74c71d57414dc9da78810d8 Bug #6130 - Letters: Fixing Subject encoding Which reads wrong. This patch looks ok to me. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21875 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21875 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #82841|0 |1 is obsolete| | --- Comment #9 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 85139 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=85139&action=edit Bug 21875: Handling subject line in Letters.pm The variable name $utf8 is very misleading: it contains MIME-Header encoding. $message->{subject} comes from the database and is in perl internal format; it should NOT be decoded as a MIME-Header. After encoding to MIME-Header, previously another (useless) encoding to UTF-8 was done. Since the string is plain ASCII, this is useless and theoretically wrong. We should stay in MIME-Header. Test plan: See Bugzilla comment5. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21875 --- Comment #10 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Tests are not trivial to write here. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21875 --- Comment #11 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Jonathan Druart from comment #9)
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Thanks -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21875 --- Comment #12 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- OK, I think I'm happy to yield here.. Passing QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21875 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #85139|0 |1 is obsolete| | --- Comment #13 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 85317 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=85317&action=edit Bug 21875: Handling subject line in Letters.pm The variable name $utf8 is very misleading: it contains MIME-Header encoding. $message->{subject} comes from the database and is in perl internal format; it should NOT be decoded as a MIME-Header. After encoding to MIME-Header, previously another (useless) encoding to UTF-8 was done. Since the string is plain ASCII, this is useless and theoretically wrong. We should stay in MIME-Header. Test plan: See Bugzilla comment5. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21875 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21875 --- Comment #14 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Martin Renvoize from comment #12)
OK, I think I'm happy to yield here.. Passing QA
Thx. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21875 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |nick@bywatersolutions.com --- Comment #15 from Nick Clemens <nick@bywatersolutions.com> --- Awesome work all! Pushed to master for 19.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21875 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |RESOLVED Resolution|--- |FIXED --- Comment #16 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Enhancement will not be backported to 18.11.x series. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21875 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This enhancement improves release notes| |the display of subject | |lines in messages so that | |they correctly show | |non-Latin characters. CC| |david@davidnind.com -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org