From 394be84dcd65a4569d0467bc12b99dbd6341fc43 Mon Sep 17 00:00:00 2001 From: Sophie Meynieux Date: Tue, 13 Aug 2013 18:14:21 +0200 Subject: [PATCH] Bug 10720: fix issue that prevented use of HTML tags in overdue notices Substitution term in overdue notices shouldn't be removed if they don't match. It prevents use of HTML in notices to use with CSS. Test plan : - define an overdue notice containing some valid substitution terms + some valid html tags ( or
Without patch, your html tags are missing in your html file With the patch, they are present and can be used with a css to generate a formatted pdf file. If you add some invalid substitution term, with the patch, they are still in the final letter, but the warn in the log helps you to correct your notice template. Signed-off-by: Srdjan Signed-off-by: Kyle M Hall Signed-off-by: Galen Charlton --- misc/cronjobs/overdue_notices.pl | 2 -- 1 file changed, 2 deletions(-) diff --git a/misc/cronjobs/overdue_notices.pl b/misc/cronjobs/overdue_notices.pl index 9575e750e4..7745047e3f 100755 --- a/misc/cronjobs/overdue_notices.pl +++ b/misc/cronjobs/overdue_notices.pl @@ -580,8 +580,6 @@ END_SQL if (@misses) { $verbose and warn "The following terms were not matched and replaced: \n\t" . join "\n\t", @misses; } - $letter->{'content'} =~ s/\<[^<>]*?\>//g; # Now that we've warned about them, remove them. - $letter->{'content'} =~ s/\<[^<>]*?\>//g; # 2nd pass for the double nesting. if ( !$nomail && scalar @emails_to_use ) { C4::Letters::EnqueueLetter( -- 2.20.1