Esempio n. 1
0
 def analyseElement(self, node):
     if node.localName.lower() == u"a": #$NON-NLS-1$
         href = node.getAttribute(u"href") #$NON-NLS-1$
         rel = node.getAttribute(u"rel").lower() #$NON-NLS-1$
         if rel.find(u"tag") == -1:#$NON-NLS-1$
             return
         (host, path) = getHostAndPath(href) #@UnusedVariable
         if not path:
             return
         pathparts = path.split(u"/") #$NON-NLS-1$
         tag = pathparts[-1].strip()
         if not tag:
             return
         try:
             self.tagwords.append(unquote_plus(tag))
         except:
             # ignore any conversion errors (for now)
             pass
Esempio n. 2
0
 def analyseElement(self, node):
     if node.localName.lower() == u"a":  #$NON-NLS-1$
         href = node.getAttribute(u"href")  #$NON-NLS-1$
         rel = node.getAttribute(u"rel").lower()  #$NON-NLS-1$
         if rel.find(u"tag") == -1:  #$NON-NLS-1$
             return
         (host, path) = getHostAndPath(href)  #@UnusedVariable
         if not path:
             return
         pathparts = path.split(u"/")  #$NON-NLS-1$
         tag = pathparts[-1].strip()
         if not tag:
             return
         try:
             self.tagwords.append(unquote_plus(tag))
         except:
             # ignore any conversion errors (for now)
             pass
Esempio n. 3
0
 def onLinkClick(self, event):
     url = getSafeString( event.getHref() )
     if url.lower().startswith(u"http"): #$NON-NLS-1$
         url = unquote_plus(url)
         osutil = getOSUtil()
         osutil.openUrlInBrowser(url)
Esempio n. 4
0
 def getSrc(self):
     return unquote_plus(self.element.getAttribute(u"src")) #$NON-NLS-1$
Esempio n. 5
0
 def getHref(self):
     return unquote_plus(self.element.getAttribute(u"href")) #$NON-NLS-1$