Skip to content

Commit

Permalink
Merge PR #5865: Backport "FIX(client): Broken link targets with perce…
Browse files Browse the repository at this point in the history
…nt signs"
  • Loading branch information
Krzmbrzl authored Sep 8, 2022
2 parents cf67bd8 + 2bd2e17 commit ea3fe75
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/mumble/Markdown.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ bool processMarkdownLink(QString &str, int &offset) {
}

QString replacement =
QString::fromLatin1("<a href=\"%1\">%2</a>").arg(unescapeURL(url)).arg(match.captured(1).toHtmlEscaped());
QString::fromLatin1("<a href=\"%1\">%2</a>").arg(unescapeURL(url), match.captured(1).toHtmlEscaped());
str.replace(match.capturedStart(), match.capturedEnd() - match.capturedStart(), replacement);

offset += replacement.size();
Expand Down Expand Up @@ -327,8 +327,7 @@ bool processPlainLink(QString &str, int &offset) {
url = QStringLiteral("http://") + url;
}

QString replacement =
QString::fromLatin1("<a href=\"%1\">%2</a>").arg(unescapeURL(url)).arg(url.toHtmlEscaped());
QString replacement = QString::fromLatin1("<a href=\"%1\">%2</a>").arg(unescapeURL(url), url.toHtmlEscaped());
str.replace(match.capturedStart(), match.capturedEnd() - match.capturedStart(), replacement);

offset += replacement.size();
Expand Down

0 comments on commit ea3fe75

Please sign in to comment.