comparison src/browser/sat_browser/panels.py @ 612:5983d6be4f07 frontends_multi_profiles

browser side (web panel): schemes are now checked, if no scheme is given (or a not accepted one), http:// is used
author Goffi <goffi@goffi.org>
date Tue, 10 Feb 2015 19:38:28 +0100
parents a5019e62c3e9
children 70872a83ef15
comparison
equal deleted inserted replaced
611:6016c74ee323 612:5983d6be4f07
478 DOM.setStyleAttribute(self._frame.getElement(), "position", "relative") 478 DOM.setStyleAttribute(self._frame.getElement(), "position", "relative")
479 self._vpanel.add(self._frame) 479 self._vpanel.add(self._frame)
480 self.setWidget(self._vpanel) 480 self.setWidget(self._vpanel)
481 481
482 def onUrlClick(self, sender): 482 def onUrlClick(self, sender):
483 self._frame.setUrl(self._url.getText()) 483 url = self._url.getText()
484 scheme_end = url.find(':')
485 scheme = "" if scheme_end == -1 else url[:scheme_end]
486 if scheme not in C.WEB_PANEL_SCHEMES:
487 url = "http://" + url
488 self._frame.setUrl(url)
484 489
485 490
486 class MainPanel(AbsolutePanel): 491 class MainPanel(AbsolutePanel):
487 492
488 def __init__(self, host): 493 def __init__(self, host):