aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/url/libkviurl.cpp
diff options
context:
space:
mode:
authorGravatar Fabio Bas2010-10-10 20:03:21 +0000
committerGravatar Fabio Bas2010-10-10 20:03:21 +0000
commitc87e99c1f0ba253ccfffaff3319c121cc60ef741 (patch)
tree883cfadabe694b01fb1594cbc9f0ac91b486c47e /src/modules/url/libkviurl.cpp
parentRework /popup so it relays the parameters correctly to /popup.show. Replace t... (diff)
downloadKVIrc-c87e99c1f0ba253ccfffaff3319c121cc60ef741.tar.gz
KVIrc-c87e99c1f0ba253ccfffaff3319c121cc60ef741.tar.bz2
KVIrc-c87e99c1f0ba253ccfffaff3319c121cc60ef741.zip
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
Diffstat (limited to 'src/modules/url/libkviurl.cpp')
-rw-r--r--src/modules/url/libkviurl.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/modules/url/libkviurl.cpp b/src/modules/url/libkviurl.cpp
index 5c6b1ef5d..e1bbdec03 100644
--- a/src/modules/url/libkviurl.cpp
+++ b/src/modules/url/libkviurl.cpp
@@ -39,6 +39,7 @@
#include "kvi_tal_popupmenu.h"
#include "kvi_window.h"
#include "kvi_options.h"
+#include "kvi_qstring.h"
#include "kvi_out.h"
#include <QFileDialog>
@@ -307,7 +308,9 @@ void UrlDialog::findtext()
void UrlDialog::dblclk_url(QTreeWidgetItem *item, int)
{
QString cmd="openurl ";
- cmd.append(item->text(0));
+ QString szUrl = item->text(0);
+ KviQString::escapeKvs(&szUrl);
+ cmd.append(szUrl);
KviKvsScript::run(cmd,this);
}
@@ -344,12 +347,18 @@ void UrlDialog::contextMenu(const QPoint &point)
void UrlDialog::sayToWin(QAction * act)
{
KviWindow *wnd = g_pApp->findWindowByCaption(act->text());
- QString say=QString("PRIVMSG %1 %2").arg(wnd->windowName(), m_szUrl);
if(wnd)
{
+ QString szUrl = m_szUrl;
+ QString szWindow = wnd->windowName();
+ KviQString::escapeKvs(&szUrl);
+ KviQString::escapeKvs(&szWindow);
+ QString say=QString("PRIVMSG %1 %2").arg(szWindow, szUrl);
KviKvsScript::run(say,wnd);
g_pFrame->setActiveWindow(wnd);
- } else QMessageBox::warning(0,__tr2qs("Warning - KVIrc"),__tr2qs("Window not found."),QMessageBox::Ok,QMessageBox::NoButton,QMessageBox::NoButton);
+ } else {
+ QMessageBox::warning(0,__tr2qs("Warning - KVIrc"),__tr2qs("Window not found."),QMessageBox::Ok,QMessageBox::NoButton,QMessageBox::NoButton);
+ }
}
QPixmap *UrlDialog::myIconPtr()