Commit a09e8297 authored by Waldo Bastian's avatar Waldo Bastian
Browse files

Backport of escape fixes for \ ( )

svn path=/branches/KDE_2_1_BRANCH/kdebase/konsole/; revision=88145
parent b644d187
......@@ -201,7 +201,10 @@ bool konsolePart::openURL( const KURL & url )
struct stat buff;
stat( QFile::encodeName( url.path() ), &buff );
QString text = ( S_ISDIR( buff.st_mode ) ? url.path() : url.directory() );
text.replace(QRegExp("\\"), "\\\\"); // escape existing '\' first
text.replace(QRegExp(" "), "\\ "); // escape spaces
text.replace(QRegExp("("), "\\("); // and '('
text.replace(QRegExp(")"), "\\)"); // and ')'
text = QString::fromLatin1("cd ") + text + '\n';
QKeyEvent e(QEvent::KeyPress, 0,-1,0, text);
initial->getEmulation()->onKeyPress(&e);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment