From c87e99c1f0ba253ccfffaff3319c121cc60ef741 Mon Sep 17 00:00:00 2001 From: Fabio Bas Date: Sun, 10 Oct 2010 20:03:21 +0000 Subject: Reunited all the kvs-escape related functions is a single method supporting different flags; small fixes to defscript and inputbar escaping in userfriendlymode git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@5057 17fca916-40b9-46aa-a4ea-0a15b648b75c --- src/modules/addon/addonfunctions.cpp | 13 ++----------- src/modules/addon/managementdialog.cpp | 1 + 2 files changed, 3 insertions(+), 11 deletions(-) (limited to 'src/modules/addon') diff --git a/src/modules/addon/addonfunctions.cpp b/src/modules/addon/addonfunctions.cpp index f9248e977..7efd047e1 100644 --- a/src/modules/addon/addonfunctions.cpp +++ b/src/modules/addon/addonfunctions.cpp @@ -229,17 +229,8 @@ namespace KviAddonFunctions } // Now we have all stuff in ~/.config/KVIrc/tmp/$rand - if(! - KviKvsScript::run( - QString::fromAscii("parse \"%1/install.kvs\"") - .arg( - szUnpackPath - .replace("\\","\\\\") - .replace("\"","\\\"") - ), - g_pActiveWindow - ) - ) + KviQString::escapeKvs(&szUnpackPath, KviQString::EscapeSpace); + if(!KviKvsScript::run(QString::fromAscii("parse %1/install.kvs").arg(szUnpackPath), g_pActiveWindow)) { // Parsing the script failed // However, the user should already be notified via normal script output. diff --git a/src/modules/addon/managementdialog.cpp b/src/modules/addon/managementdialog.cpp index fa3e31dd0..bab866c2b 100644 --- a/src/modules/addon/managementdialog.cpp +++ b/src/modules/addon/managementdialog.cpp @@ -267,6 +267,7 @@ void KviScriptManagementDialog::uninstallScript() void KviScriptManagementDialog::getMoreScripts() { + // If change this introducing not-fixed text, remember to escape this using KviQString::escapeKvs()! KviKvsScript::run("openurl http://www.kvirc.net/?id=addons&version=" KVI_VERSION "." KVI_SOURCES_DATE,g_pActiveWindow); } -- cgit v1.3.1-10-gc9f91