Skip to content

Commit

Permalink
Merge pull request #14 from JiCiT/master
Browse files Browse the repository at this point in the history
Deal with "special" characters, looks like I forgot to quote there ;-)
  • Loading branch information
annejan committed Mar 2, 2015
2 parents ef7cf7e + c356127 commit 3b146cf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ void MainWindow::on_treeView_clicked(const QModelIndex &index)
passFile.replace(QRegExp("^" + passStore), "");
if (model.fileInfo(proxyModel.mapToSource(index)).isFile()){
if (usePass) {
executePass(passFile);
executePass('"' + passFile+ '"');
} else {
executeWrapper(gpgExecutable , "--no-tty -dq " + filePath);
}
Expand Down Expand Up @@ -225,6 +225,8 @@ void MainWindow::readyRead(bool finished = false) {
}
}
}
output.replace(QRegExp("<"), "&lt;");
output.replace(QRegExp(">"), "&gt;");
output.replace(QRegExp("((http|https|ftp)\\://[a-zA-Z0-9\\-\\.]+\\.[a-zA-Z]{2,3}(:[a-zA-Z0-9]*)?/?([a-zA-Z0-9\\-\\._\\?\\,\\'/\\\\+&amp;%\\$#\\=~])*)"), "<a href=\"\\1\">\\1</a>");
output.replace(QRegExp("\n"), "<br />");
ui->textBrowser->setHtml(output);
Expand Down

0 comments on commit 3b146cf

Please sign in to comment.