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 textwrap
import mimetypes
import urllib
import pkg_resources
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.
"""
html = jinja.render('back.html',
title='Suspended: ' + url.fragment())
html = jinja.render(
'back.html',
title='Suspended: ' + urllib.parse.unquote(url.fragment()))
return 'text/html', html

View File

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