[Spambayes-checkins] spambayes/spambayes ProxyUI.py,1.59,1.60

Tony Meyer anadelonbrin at users.sourceforge.net
Fri Jan 28 02:28:01 CET 2005


Update of /cvsroot/spambayes/spambayes/spambayes
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21859/spambayes

Modified Files:
	ProxyUI.py 
Log Message:
Correct the escaping of subject lines.

Index: ProxyUI.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/spambayes/ProxyUI.py,v
retrieving revision 1.59
retrieving revision 1.60
diff -C2 -d -r1.59 -r1.60
*** ProxyUI.py	10 Jan 2005 02:36:20 -0000	1.59
--- ProxyUI.py	28 Jan 2005 01:27:59 -0000	1.60
***************
*** 343,347 ****
                  else:
                      h = self.html.reviewRow.headerValue.clone()
!                 h.text = cgi.escape(text)
                  row.optionalHeadersValues += h
  
--- 343,347 ----
                  else:
                      h = self.html.reviewRow.headerValue.clone()
!                 h.text = text
                  row.optionalHeadersValues += h
  
***************
*** 361,365 ****
                  del row.received_
  
!             subj = messageInfo.subjectHeader
              row.classify.href="showclues?key=%s&subject=%s" % (key, subj)
              row.tokens.href="showclues?key=%s&subject=%s&tokens=1" % (key, subj)
--- 361,370 ----
                  del row.received_
  
!             # Many characters can't go in the URL or they cause problems
!             # (&, ;, ?, etc).  So we use the hex values for them all.
!             subj_list = []
!             for c in messageInfo.subjectHeader:
!                 subj_list.append("%%%s" % (hex(ord(c))[2:],))
!             subj = "".join(subj_list)
              row.classify.href="showclues?key=%s&subject=%s" % (key, subj)
              row.tokens.href="showclues?key=%s&subject=%s&tokens=1" % (key, subj)



More information about the Spambayes-checkins mailing list