Skip to content
Permalink
Browse files

Log, TextMessage: remove $ as an illegal character in our simple URL …

…regexp.

Per RFC 3986, $ is legal in various parts of a well-formed URL.

Note that we run matches of these regexps through QUrl, so
we'll always end up with a valid URL in any case.

Fixes issue #1345
  • Loading branch information...
mkrautz committed Aug 16, 2014
1 parent 75761f9 commit d299360f51047c150503b36a7ea4b6ee91e1f8e1
Showing with 2 additions and 2 deletions.
  1. +1 −1 src/mumble/Log.cpp
  2. +1 −1 src/mumble/TextMessage.cpp
@@ -507,7 +507,7 @@ void Log::log(MsgType mt, const QString &console, const QString &terse, bool own
return;

// Apply simplifications to spoken text
QRegExp identifyURL(QLatin1String("[a-z-]+://[^ <$]*"),
QRegExp identifyURL(QLatin1String("[a-z-]+://[^ <]*"),
Qt::CaseInsensitive,
QRegExp::RegExp2);

@@ -61,7 +61,7 @@ QString TextMessage::autoFormat(QString qsPlain) {
qr.setPattern(QLatin1String("\"([^\"]+)\""));
qsPlain.replace(qr, QLatin1String("\"<i>\\1</i>\""));

qr.setPattern(QLatin1String("[a-z-]+://[^ <$]*"));
qr.setPattern(QLatin1String("[a-z-]+://[^ <]*"));
qr.setMinimal(false);

int idx = 0;

0 comments on commit d299360

Please sign in to comment.
You can’t perform that action at this time.