Sanitize propeerly all Urls for opening in ext. tool.

This commit is contained in:
Martin Rotter 2017-10-20 22:33:57 +02:00
parent 0af0c7ab03
commit 56d5b707d0

View File

@ -527,7 +527,9 @@ void MessagesView::openSelectedMessagesWithExternalTool() {
auto tool = sndr->data().value<ExternalTool>();
foreach (const QModelIndex& index, selectionModel()->selectedRows()) {
const QString& link = m_sourceModel->messageAt(m_proxyModel->mapToSource(index).row()).m_url;
const QString link = m_sourceModel->messageAt(m_proxyModel->mapToSource(index).row())
.m_url
.replace(QRegularExpression("[\\t\\n]"), QString());
if (!link.isEmpty()) {
if (!QProcess::startDetached(tool.executable(), QStringList() << tool.parameters() << link)) {