Changeset 43 for protocols

Show
Ignore:
Timestamp:
07/21/06 00:08:10 (2 years ago)
Author:
ploum
Message:

deuglify the bug widget.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • protocols/protocol_launchpadweb.py

    r41 r43  
    2121# -  user.password() -> string that contains the password 
    2222 
     23 
     24### Launchpad only functions #### 
     25 
     26        def htmlify(self, string) : 
     27                s1 = string.strip().replace(" "," ") 
     28                s2 = s1.strip().replace(">",">") 
     29                return s2 
    2330         
    2431################INFORMATION ABOUT THE BTS ################################ 
     
    8390                                        if jj != None and jj != "<br />" : 
    8491                                                # here we remove manually all &nbsp 
    85                                                 newj = jj.strip().replace("&nbsp;"," ") 
     92                                                newj = self.htmlify(jj) 
     93                                                #newj = jj.strip().replace("&nbsp;"," ") 
    8694                                                content = "%s\n%s"%(content,newj) 
    8795                                content = "%s\n"%content 
     
    110118                                                        phrase += ligne.string 
    111119                                        #phrase = z.contents[0].string 
    112                                         new_phrase = phrase.strip().replace("&nbsp;"," ") 
    113                                         new_phrase2 = new_phrase.strip().replace("&gt;",">") 
    114                                         content = "%s\n%s" %(content,new_phrase2) 
     120                                        new_phrase = self.htmlify(phrase) 
     121                                        #new_phrase2 = new_phrase.strip().replace("&gt;",">") 
     122                                        content = "%s\n%s" %(content,new_phrase) 
    115123                                newcom = comment(com_counter,content,poster,title,"00/00/00") 
    116124                                zebug.addComment(newcom)