summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnne Jan Brouwer <annejan@noprotocol.com>2015-09-24 21:34:54 +0200
committerAnne Jan Brouwer <annejan@noprotocol.com>2015-09-24 21:34:54 +0200
commitd4e43730d89e86294e6c26f6ad0ee5f1970ca90e (patch)
tree0ddb9f41fb63077f041f70fc86c621250acfff58
parent7e735f372becc03112bc6d4b89d93dd00c786f9f (diff)
Simpler regex for url replacement, solves #97
-rw-r--r--mainwindow.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/mainwindow.cpp b/mainwindow.cpp
index be9a873e..cea11895 100644
--- a/mainwindow.cpp
+++ b/mainwindow.cpp
@@ -732,7 +732,7 @@ void MainWindow::readyRead(bool finished = false) {
output = "<span style=\"color: red;\">" + error + "</span><br />" + output;
}
- 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("((?:https?|ftp)://\\S+)"), "<a href=\"\\1\">\\1</a>");
output.replace(QRegExp("\n"), "<br />");
if (!ui->textBrowser->toPlainText().isEmpty()) {
output = ui->textBrowser->toHtml() + output;
@@ -1212,7 +1212,7 @@ QList<UserInfo> MainWindow::listKeys(QString keystring, bool secret)
}
current_user = UserInfo();
current_user.key_id = props[4];
- current_user.name = props[9];
+ current_user.name = props[9].toUtf8();
current_user.validity = props[8][0].toLatin1();
current_user.created.setTime_t(props[5].toInt());
current_user.expiry.setTime_t(props[6].toInt());