Skip to content

Commit

Permalink
#2726 link-dialog: remove newline in links from clipboard
Browse files Browse the repository at this point in the history
  • Loading branch information
pbek committed Sep 30, 2023
1 parent b8126ea commit eff2c6f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/dialogs/linkdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ LinkDialog::LinkDialog(int page, const QString &dialogTitle, QWidget *parent)

if (page == LinkDialog::TextLinkPage) {
QClipboard *clipboard = QApplication::clipboard();
const QString text = clipboard->text().trimmed();
const QString text = clipboard->text()
.remove(QStringLiteral("\n"))
.trimmed();
const QUrl url(text);

// set text from clipboard
Expand Down

0 comments on commit eff2c6f

Please sign in to comment.