Changeset 33 for page.py

Show
Ignore:
Timestamp:
07/09/06 17:28:56 (2 years ago)
Author:
ploum
Message:

#12 Cannot rename a bookmark
+ sanitize XML stuff (prettyXML is really nasty)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • page.py

    r32 r33  
    6363                        bmark.setAttribute("title", title) 
    6464                        node = doc.createElement("bug") 
    65                         node_text = doc.createTextNode(bug) 
     65                        node_text = doc.createTextNode(bug.strip()) 
    6666                        node.appendChild(node_text) 
    6767                        bmark.appendChild(node) 
     
    7272                        bmark.setAttribute("title", title) 
    7373                        node = doc.createElement("search") 
    74                         node_text = doc.createTextNode(search) 
     74                        node_text = doc.createTextNode(search.strip()) 
    7575                        node.appendChild(node_text) 
    7676                        bmark.appendChild(node)          
     
    8484                                title = "(%s) %s"%(product,search) 
    8585                                node = doc.createElement("search") 
    86                                 node_text = doc.createTextNode(search) 
     86                                node_text = doc.createTextNode(search.strip()) 
    8787                                node.appendChild(node_text) 
    8888                                bmark.appendChild(node)          
     
    9090                        bmark.setAttribute("title", title) 
    9191                        prod = doc.createElement("product") 
    92                         prod_text = doc.createTextNode(product) 
     92                        prod_text = doc.createTextNode(product.strip()) 
    9393                        prod.appendChild(prod_text) 
    9494                        bmark.appendChild(prod)