Summary: | using 'amp' as nickname causes unexpected highlights | ||
---|---|---|---|
Product: | [Applications] konversation | Reporter: | antix0 |
Component: | notifications | Assignee: | Konversation Developers <konversation-devel> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | hein |
Priority: | NOR | ||
Version: | 1.0.1 | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
antix0
2007-11-29 01:46:14 UTC
Still there in r798635 commit de3a1926d95012619317f88e8a25cf165d4c5849 branch master Author: Peter Simonsson <peter.simonsson@gmail.com> Date: Sun Dec 19 20:20:59 2010 +0100 Use original line when looking for highlights in filter Using the original line when looking for highlights avoids running into trouble with html formating interfering with the highlights BUG:153101 diff --git a/src/viewer/ircview.cpp b/src/viewer/ircview.cpp index 6c91060..25f661e 100644 --- a/src/viewer/ircview.cpp +++ b/src/viewer/ircview.cpp @@ -996,7 +996,7 @@ bool doHighlight, bool parseURL, bool self, QChar::Direction* direction) QString highlightColor; if(Preferences::self()->highlightNick() && - filteredLine.toLower().contains(QRegExp("(^|[^\\d\\w])" + + line.toLower().contains(QRegExp("(^|[^\\d\\w])" + QRegExp::escape(ownNick.toLower()) + "([^\\d\\w]|$)"))) { @@ -1020,7 +1020,7 @@ bool doHighlight, bool parseURL, bool self, QChar::Direction* direction) QRegExp needleReg(highlight->getPattern()); needleReg.setCaseSensitivity(Qt::CaseInsensitive); // highlight regexp in text - patternFound = ((filteredLine.contains(needleReg)) || + patternFound = ((line.contains(needleReg)) || // highlight regexp in nickname (whoSent.contains(needleReg))); @@ -1032,7 +1032,7 @@ bool doHighlight, bool parseURL, bool self, QChar::Direction* direction) { QString needle=highlight->getPattern(); // highlight patterns in text - patternFound = ((filteredLine.contains(needle, Qt::CaseInsensitive)) || + patternFound = ((line.contains(needle, Qt::CaseInsensitive)) || // highlight patterns in nickname (whoSent.contains(needle, Qt::CaseInsensitive))); } |