Patchwork Decode the subject header

login
register
mail settings
Submitter Dirk Wallenstein
Date Jan. 13, 2011, 8:37 a.m.
Message ID <1294907876-17218-1-git-send-email-halsmit@t-online.de>
Download mbox | patch
Permalink /patch/78680/
State Accepted
Commit fae459d0b284b9a04cdf95f375357addc8ed36ec
Headers show

Comments

Dirk Wallenstein - Jan. 13, 2011, 8:37 a.m.
The clean_header function decodes internationalized headers.  Use it for
the subject, too.

Signed-off-by: Dirk Wallenstein <halsmit@t-online.de>
---
An example is here:
http://patchwork.freedesktop.org/patch/3648/

 apps/patchwork/bin/parsemail.py |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
Jeremy Kerr - Feb. 11, 2011, 1:10 a.m.
Dirk,

> The clean_header function decodes internationalized headers.  Use it for
> the subject, too.

Thanks, applied. I've also added some testcases for this change too.

Cheers,


Jeremy

Patch

diff --git a/apps/patchwork/bin/parsemail.py b/apps/patchwork/bin/parsemail.py
index 700cb6f..0a9daf5 100755
--- a/apps/patchwork/bin/parsemail.py
+++ b/apps/patchwork/bin/parsemail.py
@@ -306,6 +306,8 @@  def clean_subject(subject, drop_prefixes = None):
     '[bar] meep'
     """
 
+    subject = clean_header(subject)
+
     if drop_prefixes is None:
         drop_prefixes = []
     else: