[Spambayes-checkins] spambayes/spambayes ProxyUI.py, 1.45.4.1,
1.45.4.2
Tony Meyer
anadelonbrin at users.sourceforge.net
Fri Jan 28 02:19:10 CET 2005
Update of /cvsroot/spambayes/spambayes/spambayes
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20151/spambayes
Modified Files:
Tag: release_1_0-branch
ProxyUI.py
Log Message:
Correct the fix for escaping subject lines - the problem was in the clues/tokens table,
not the review one (and the 'fix' was double-escaping them which is not nice). Instead
we need to make sure that we make the URL nicer.
A message with a subject of "&<>" and a body of "<>&" works for me now, so I figure
this should be fixed.
Index: ProxyUI.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/spambayes/ProxyUI.py,v
retrieving revision 1.45.4.1
retrieving revision 1.45.4.2
diff -C2 -d -r1.45.4.1 -r1.45.4.2
*** ProxyUI.py 20 Dec 2004 03:45:39 -0000 1.45.4.1
--- ProxyUI.py 28 Jan 2005 01:19:07 -0000 1.45.4.2
***************
*** 329,333 ****
else:
h = self.html.reviewRow.headerValue.clone()
! h.text = cgi.escape(text)
row.optionalHeadersValues += h
--- 329,333 ----
else:
h = self.html.reviewRow.headerValue.clone()
! h.text = text
row.optionalHeadersValues += h
***************
*** 343,347 ****
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)
--- 343,352 ----
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