Leave URLs encoded when setting commandline
This commit is contained in:
parent
4d6dd808b1
commit
49fd08b30d
4
doc/BUGS
4
doc/BUGS
@ -17,10 +17,6 @@ Bugs
|
||||
- Segfaults when trying to load http://cmpl.cc/downloads/hlwm-tablet.mkv and
|
||||
with youtube HTML5 player.
|
||||
|
||||
- URL detection and encoded spaces
|
||||
|
||||
e.g. when trying to open a link with %20 interactively, or even via click.
|
||||
|
||||
- When quitting while being asked for a download filename: segfault / memory
|
||||
corruption
|
||||
|
||||
|
@ -457,19 +457,19 @@ class CommandDispatcher:
|
||||
@cmdutils.register(instance='mainwindow.tabs.cmd', hide=True)
|
||||
def open_tab_cur(self):
|
||||
"""Set the statusbar to :tabopen and the current URL."""
|
||||
urlstr = self._current_url().toDisplayString()
|
||||
urlstr = self._current_url().toDisplayString(QUrl.FullyEncoded)
|
||||
message.set_cmd_text(':open-tab ' + urlstr)
|
||||
|
||||
@cmdutils.register(instance='mainwindow.tabs.cmd', hide=True)
|
||||
def open_cur(self):
|
||||
"""Set the statusbar to :open and the current URL."""
|
||||
urlstr = self._current_url().toDisplayString()
|
||||
urlstr = self._current_url().toDisplayString(QUrl.FullyEncoded)
|
||||
message.set_cmd_text(':open ' + urlstr)
|
||||
|
||||
@cmdutils.register(instance='mainwindow.tabs.cmd', hide=True)
|
||||
def open_tab_bg_cur(self):
|
||||
"""Set the statusbar to :tabopen-bg and the current URL."""
|
||||
urlstr = self._current_url().toDisplayString()
|
||||
urlstr = self._current_url().toDisplayString(QUrl.FullyEncoded)
|
||||
message.set_cmd_text(':open-tab-bg ' + urlstr)
|
||||
|
||||
@cmdutils.register(instance='mainwindow.tabs.cmd')
|
||||
|
@ -320,8 +320,9 @@ class HintManager(QObject):
|
||||
Target.cmd_tab: 'open-tab',
|
||||
Target.cmd_tab_bg: 'open-tab-bg',
|
||||
}
|
||||
urlstr = url.toDisplayString(QUrl.FullyEncoded)
|
||||
message.set_cmd_text(':{} {}'.format(commands[self._context.target],
|
||||
url.toDisplayString()))
|
||||
urlstr))
|
||||
|
||||
def _download(self, url):
|
||||
"""Download a hint URL.
|
||||
|
Loading…
Reference in New Issue
Block a user