[Spambayes-checkins] spambayes/Outlook2000 addin.py,1.7,1.8

Tim Peters tim_one@users.sourceforge.net
Sun, 20 Oct 2002 13:20:36 -0700


Update of /cvsroot/spambayes/spambayes/Outlook2000
In directory usw-pr-cvs1:/tmp/cvs-serv19850

Modified Files:
	addin.py 
Log Message:
ShowClues():  apply cgi.escape() to words (angle brackets were confusing
Outlook's HTML display).


Index: addin.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/Outlook2000/addin.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** addin.py	20 Oct 2002 18:53:06 -0000	1.7
--- addin.py	20 Oct 2002 20:20:34 -0000	1.8
***************
*** 114,117 ****
--- 114,119 ----
  
  def ShowClues(mgr, app):
+     from cgi import escape
+ 
      sel = app.ActiveExplorer().Selection
      if sel.Count == 0:
***************
*** 143,147 ****
      max_word_len = max(map(len, words))
      for word, prob in zip(words, probs):
!         push(word + ' ' * (max_word_len - len(word)))
          push(' ' + prob + '\n')
      push("</PRE>\n")
--- 145,149 ----
      max_word_len = max(map(len, words))
      for word, prob in zip(words, probs):
!         push(escape(word) + ' ' * (max_word_len - len(word)))
          push(' ' + prob + '\n')
      push("</PRE>\n")