There are some places in Koha where we use mailto: links with a subject line. An example is the email link added by bug 36595. I believe we need to take a closer look at making sure we are encoding the subject line correctly. Also need to make sure to not include untranslatable and therefore hardcoded bits into the subject messages.
So, on my quick research I reckon we need a new TT filter to make sure subjects are properly RFC2047 encoded. We should be able to add that fairly trivially using Encode::MIME::Header I think.
Created attachment 171518 [details] [review] Bug 37918: Add email_header template toolkit filter This patch adds a new email_header TT filter to properly encode strings according to RFC2047 as per the email specification. This allows developers to set default subjects in mailto links with the correct encoding.
Created attachment 171994 [details] [review] Bug 37918: Add email_header template toolkit filter This patch adds a new email_header TT filter to properly encode strings according to RFC2047 as per the email specification. This allows developers to set default subjects in mailto links with the correct encoding. Signed-off-by: Shi Yao Wang <shi-yao.wang@inlibro.com>
Assuming I only needed to make sure the test passes for the sign-off. Should we include refactoring of mailto with subject in this bug?
Yes indeed, that was the next step here.
Created attachment 176576 [details] [review] Bug 37918: Remove the new dependency
Do we really need the new dep?
24 use Encode::MIME::Header; but you are not using it?