diff --git a/retroshare-gui/src/gui/Posted/PostedItem.cpp b/retroshare-gui/src/gui/Posted/PostedItem.cpp index a838c5ad8..af420f75a 100644 --- a/retroshare-gui/src/gui/Posted/PostedItem.cpp +++ b/retroshare-gui/src/gui/Posted/PostedItem.cpp @@ -193,7 +193,10 @@ void PostedItem::fill() ui->fromLabel->setId(mPost.mMeta.mAuthorId); // Use QUrl to check/parse our URL - QUrl url(QString::fromStdString(mPost.mLink)); + // The only combination that seems to work: load as EncodedUrl, extract toEncoded(). + QUrl url; + QByteArray urlarray(mPost.mLink.c_str()); + url.setEncodedUrl(urlarray); QString urlstr = "Invalid Link"; QString sitestr = "Invalid Link"; bool urlOkay = url.isValid(); @@ -202,7 +205,8 @@ void PostedItem::fill() QString scheme = url.scheme(); if ((scheme != "https") && (scheme != "http") - && (scheme != "ftp")) + && (scheme != "ftp") + && (scheme != "retroshare")) { urlOkay = false; sitestr = "Invalid Link Scheme"; @@ -211,7 +215,11 @@ void PostedItem::fill() if (urlOkay) { - urlstr = QString(" %2 ").arg(url.toString()).arg(messageName()); + urlstr = QString(" "); + urlstr += messageName(); + urlstr += QString(" "); QString siteurl = url.scheme() + "://" + url.host(); sitestr = QString(" %2 ").arg(siteurl).arg(siteurl); diff --git a/retroshare-gui/src/gui/gxs/GxsCreateCommentDialog.cpp b/retroshare-gui/src/gui/gxs/GxsCreateCommentDialog.cpp index dea3deb7e..a1e20e37c 100644 --- a/retroshare-gui/src/gui/gxs/GxsCreateCommentDialog.cpp +++ b/retroshare-gui/src/gui/gxs/GxsCreateCommentDialog.cpp @@ -35,6 +35,7 @@ GxsCreateCommentDialog::GxsCreateCommentDialog(TokenQueue *tokQ, RsGxsCommentSer { ui->setupUi(this); connect(ui->buttonBox, SIGNAL(accepted()), this, SLOT(createComment())); + connect(ui->buttonBox, SIGNAL(rejected()), this, SLOT(close())); /* fill in the available OwnIds for signing */ ui->idChooser->loadIds(IDCHOOSER_ID_REQUIRED, RsGxsId());