mirror of
https://github.com/martinrotter/rssguard.git
synced 2025-02-03 10:47:47 +01:00
Properly sanitize titles of downloaded messages.
This commit is contained in:
parent
18491750fb
commit
cccd6ebee2
@ -178,8 +178,10 @@ void Feed::run() {
|
||||
|
||||
// Sanitize title. Remove newlines etc.
|
||||
msgs[i].m_title = QUrl::fromPercentEncoding(msgs[i].m_title.toUtf8())
|
||||
.remove(QRegExp(QSL("[\\n\\r\\t]")))
|
||||
.replace(QRegExp(QSL("[]")), QSL(" "));
|
||||
// Replace all continuous white space.
|
||||
.replace(QRegExp(QSL("[\\s]{2,}")), QSL(" "))
|
||||
// Remove all newlines and leading white space.
|
||||
.remove(QRegExp(QSL("([\\n\\r])|(^\\s)")));
|
||||
}
|
||||
|
||||
emit messagesObtained(msgs, error_during_obtaining);
|
||||
|
Loading…
x
Reference in New Issue
Block a user