1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 02:36:34 +01:00

SpeedDial: Base64 encode initial script

Fixes parse errors when there is html encoded quote char.

BUG: 402024
FIXED-IN: 3.1.0
This commit is contained in:
David Rosca 2018-12-24 13:41:36 +01:00
parent 7f8b318315
commit a6c266b6c6
No known key found for this signature in database
GPG Key ID: EBC3FC294452C6D8
2 changed files with 2 additions and 2 deletions

View File

@ -450,7 +450,7 @@ function init() {
$('#fadeOverlay').click();
});
var pages = JSON.parse(scriptData.initialScript);
var pages = JSON.parse(atob(scriptData.initialScript));
for (var i = 0; i < pages.length; ++i) {
var page = pages[i];
addBox(page.url, page.title, page.img);

View File

@ -239,7 +239,7 @@ QString FalkonSchemeReply::speeddialPage()
QString page = dPage;
SpeedDial* dial = mApp->plugins()->speedDial();
page.replace(QLatin1String("%INITIAL-SCRIPT%"), dial->initialScript());
page.replace(QLatin1String("%INITIAL-SCRIPT%"), dial->initialScript().toUtf8().toBase64());
page.replace(QLatin1String("%IMG_BACKGROUND%"), dial->backgroundImage());
page.replace(QLatin1String("%URL_BACKGROUND%"), dial->backgroundImageUrl());
page.replace(QLatin1String("%B_SIZE%"), dial->backgroundImageSize());