urlencode fix

This commit is contained in:
mhm@mhm.com 2017-11-24 17:15:26 +01:00
parent e2d5a443cc
commit 9df149fe8f
2 changed files with 8 additions and 3 deletions

View File

@ -29,6 +29,7 @@ import os
import time import time
import textwrap import textwrap
import mimetypes import mimetypes
import urllib
import pkg_resources import pkg_resources
from PyQt5.QtCore import QUrlQuery, QUrl from PyQt5.QtCore import QUrlQuery, QUrl
@ -431,8 +432,9 @@ def qute_back(url):
Simple page to free ram / lazy load a site, goes back on focusing the tab. Simple page to free ram / lazy load a site, goes back on focusing the tab.
""" """
html = jinja.render('back.html', html = jinja.render(
title='Suspended: ' + url.fragment()) 'back.html',
title='Suspended: ' + urllib.parse.unquote(url.fragment()))
return 'text/html', html return 'text/html', html

View File

@ -22,6 +22,7 @@
import os import os
import os.path import os.path
import itertools import itertools
import urllib
import sip import sip
from PyQt5.QtCore import QUrl, QObject, QPoint, QTimer from PyQt5.QtCore import QUrl, QObject, QPoint, QTimer
@ -372,7 +373,9 @@ class SessionManager(QObject):
lazy_index = i + 1 lazy_index = i + 1
lazy_load.append({ lazy_load.append({
'title': histentry['title'], 'title': histentry['title'],
'url': 'qute://back#' + histentry['title'], 'url':
'qute://back#' +
urllib.parse.quote(histentry['title']),
'active': True 'active': True
}) })
histentry['active'] = False histentry['active'] = False