Пример #1
0
 def getBrowserState(self, widget):
     url = util.getRealUrl(widget)
     if url and not url.startswith("file://"):
         return url
     # Ignore non-breaking spaces, they are invisible anyway
     # Webkit returns them in invalid format without the semicolons... handle that too.
     text = widget.getText().replace(u"\xa0", " ")
     return BrowserHtmlParser().parse(text)
Пример #2
0
 def getUrlOrText(self):
     return util.getRealUrl(self.widget) or self.widget.getText()
Пример #3
0
 def getBrowserState(self, widget):
     url = util.getRealUrl(widget)
     return url or BrowserHtmlParser().parse(widget.getText())