[Bug 9372] New: Automatic carriage return in message_queue where content_type is html
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9372 Bug ID: 9372 Summary: Automatic carriage return in message_queue where content_type is html Classification: Unclassified Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Patrons Assignee: koha-bugs@lists.koha-community.org Reporter: stephane.delaune@biblibre.com CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com html messages in message_queue have not <br /> instead of \n for html content types -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9372 stephane.delaune@biblibre.com changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |stephane.delaune@biblibre.c |ity.org |om -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9372 stephane.delaune@biblibre.com changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=6030 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9372 --- Comment #1 from stephane.delaune@biblibre.com --- Created attachment 14487 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=14487&action=edit proposed patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9372 --- Comment #2 from stephane.delaune@biblibre.com --- Created attachment 14488 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=14488&action=edit proposed patch for 3.8 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9372 stephane.delaune@biblibre.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9372 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA CC| |kyle@bywatersolutions.com --- Comment #3 from Kyle M Hall <kyle@bywatersolutions.com> --- This patch appears to be stripping all whitespace from messages: Example before patch: Dear Henry Acevedo, <a href="#">test</a> You have a hold available for pickup as of 2013-01-11. This hold will expire if it is not picked up before 01/18/2013. If you no longer need this item or have any questions please contact us : Title: Learning Perl Author: Schwartz, Randal L 005.13/3 Location: Centerville Example after patch: DearHenryAcevedo,<ahref="#">test</a>Youhaveaholdavailableforpickupasof2013-01-11.Thisholdwillexpireifitisnotpickedupbefore01/18/2013.Ifyounolongerneedthisitemorhaveanyquestionspleasecontactus:Title:LearningPerlAuthor:Schwartz,RandalL005.13/3Location:Centerville -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9372 --- Comment #4 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 14546 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=14546&action=edit Bug 9372 - Automatic carriage return in message_queue where content_type is html - Followup The patch for bug 9372 causes all whitespace to be stripped from a message. This is because the $content variable was previously loaded with the content and then stripped of whitespace to determine if the message had any text. The previous patch for 9372 then used the $content variable as if it were the original unmodified content of the message. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9372 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #14487|0 |1 is obsolete| | --- Comment #5 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 14547 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=14547&action=edit Bug 9372 : replace \n with <br /> for html messages in message_queue Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9372 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #14546|0 |1 is obsolete| | --- Comment #6 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 14548 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=14548&action=edit Bug 9372 - Automatic carriage return in message_queue where content_type is html - Followup The patch for bug 9372 causes all whitespace to be stripped from a message. This is because the $content variable was previously loaded with the content and then stripped of whitespace to determine if the message had any text. The previous patch for 9372 then used the $content variable as if it were the original unmodified content of the message. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9372 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #14547|Bug 9372 : replace \n with |[SIGNED-OFF] Bug 9372 : description|<br /> for html messages in |replace \n with <br /> for |message_queue |html messages in | |message_queue -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9372 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #14488|0 |1 is obsolete| | --- Comment #7 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 14549 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=14549&action=edit [SIGNED-OFF] Bug 9372 : replace \n with <br /> for html messages in message_queue [3.8.x] Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9372 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9372 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Needs Signoff --- Comment #8 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- This patch will need a sign off before it can be QAed. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9372 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #9 from Owen Leonard <oleonard@myacpl.org> --- Looks like the follow-up still needs to be signed off? But it doesn't have a test plan, so please add one. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9372 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #10 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I was wondering about this patch. If we automatically change evey line break to be a <br/> tag, wouldn't that be confusing when creating html messages? Normally when you make a line break in HTML code this has no effect on the layout later? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9372 --- Comment #11 from Sophie MEYNIEUX <sophie.meynieux@biblibre.com> --- Created attachment 20062 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=20062&action=edit Bug 9372 : Replaces carriage return with <br /> in printed html files for overdues. For pdf generation, html files need explicit <br /> html tags. With this patch, carriage return are replaced by <br /> when letters are written into html files. Test plan : - Ensure you've got at least one reader with overdue triggering notice - Ensure that your notice template got html checked - Run misc/cronjobs/overdue_notices.pl -v -n -html <dirname> and misc/cronjobs/printoverdues.sh <dirname> Without patch, the content of the letter is all on one line in pdf file With the patch, pdf file is correctly formated - remove your reader email - Run misc/cronjobs/overdue_notices.pl -v -html <dirname> and misc/cronjobs/printoverdues.sh <dirname> Without patch, the content of pdf file is all on one line with the patch, pdf file is correctly formated. - restore reader email - run misc/cronjobs/overdue_notice.pl -v -html <dirname> Verify that the a message has been generated in message_queue table With or without patch, the message is the same -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9372 Sophie MEYNIEUX <sophie.meynieux@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff CC| |sophie.meynieux@biblibre.co | |m Assignee|stephane.delaune@biblibre.c |sophie.meynieux@biblibre.co |om |m -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9372 Sophie MEYNIEUX <sophie.meynieux@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #14547|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9372 Sophie MEYNIEUX <sophie.meynieux@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #14548|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9372 --- Comment #12 from Sophie MEYNIEUX <sophie.meynieux@biblibre.com> --- To take Kratin's comment into account, I propose this new patch that changes carriage returns with <br /> only in printed files if paramter file format is html. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9372 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9372 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #20062|0 |1 is obsolete| | --- Comment #13 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 20071 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=20071&action=edit Bug 9372 : Replaces carriage return with <br /> in printed html files for overdues. For pdf generation, html files need explicit <br /> html tags. With this patch, carriage return are replaced by <br /> when letters are written into html files. Test plan : - Ensure you've got at least one reader with overdue triggering notice - Ensure that your notice template got html checked - Run misc/cronjobs/overdue_notices.pl -v -n -html <dirname> and misc/cronjobs/printoverdues.sh <dirname> Without patch, the content of the letter is all on one line in pdf file With the patch, pdf file is correctly formated - remove your reader email - Run misc/cronjobs/overdue_notices.pl -v -html <dirname> and misc/cronjobs/printoverdues.sh <dirname> Without patch, the content of pdf file is all on one line with the patch, pdf file is correctly formated. - restore reader email - run misc/cronjobs/overdue_notice.pl -v -html <dirname> Verify that the a message has been generated in message_queue table With or without patch, the message is the same Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9372 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9372 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #14549|0 |1 is obsolete| | Attachment #20071|0 |1 is obsolete| | --- Comment #14 from Chris Cormack <chris@bigballofwax.co.nz> --- Created attachment 21003 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=21003&action=edit Bug 9372 : Replaces carriage return with <br /> in printed html files for overdues. For pdf generation, html files need explicit <br /> html tags. With this patch, carriage return are replaced by <br /> when letters are written into html files. Test plan : - Ensure you've got at least one reader with overdue triggering notice - Ensure that your notice template got html checked - Run misc/cronjobs/overdue_notices.pl -v -n -html <dirname> and misc/cronjobs/printoverdues.sh <dirname> Without patch, the content of the letter is all on one line in pdf file With the patch, pdf file is correctly formated - remove your reader email - Run misc/cronjobs/overdue_notices.pl -v -html <dirname> and misc/cronjobs/printoverdues.sh <dirname> Without patch, the content of pdf file is all on one line with the patch, pdf file is correctly formated. - restore reader email - run misc/cronjobs/overdue_notice.pl -v -html <dirname> Verify that the a message has been generated in message_queue table With or without patch, the message is the same Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9372 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #15 from Galen Charlton <gmcharlt@gmail.com> --- Pushed to master. Thanks, Sophie! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9372 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable CC| |tomascohen@gmail.com --- Comment #16 from Tomás Cohen Arazi <tomascohen@gmail.com> --- This patch has been pushed to 3.12.x, will be in 3.12.7. Thanks Sophie! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9372 Sophie MEYNIEUX <sophie.meynieux@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=11173 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9372 Sophie MEYNIEUX <sophie.meynieux@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=12294 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9372 --- Comment #17 from Sophie MEYNIEUX <sophie.meynieux@biblibre.com> --- As in Bug 11173 it was decided to write full html in letter models, this patch should be reverted, because models in html already contains <br /> tags -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9372 --- Comment #18 from Sophie MEYNIEUX <sophie.meynieux@biblibre.com> --- Forget my last comment, it is done by Bug 12294 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org