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)
def getUrlOrText(self): return util.getRealUrl(self.widget) or self.widget.getText()
def getBrowserState(self, widget): url = util.getRealUrl(widget) return url or BrowserHtmlParser().parse(widget.getText())