Fix #277.
This commit is contained in:
parent
5c586f060a
commit
ca86d66bd2
@ -77,8 +77,11 @@ void Message::sanitize() {
|
||||
// Sanitize title.
|
||||
m_title = m_title
|
||||
|
||||
// Remove non-breaking spaces.
|
||||
.replace(QRegularExpression(QSL("[\\u202F\\u00A0 ]")), QSL(" "))
|
||||
|
||||
// Shrink consecutive whitespaces.
|
||||
.replace(QRegularExpression(QSL("[\\s\\u202F\\u00A0]{2,}")), QSL(" "))
|
||||
.replace(QRegularExpression(QSL("[\\s]{2,}")), QSL(" "))
|
||||
|
||||
// Remove all newlines and leading white space.
|
||||
.remove(QRegularExpression(QSL("([\\n\\r])|(^\\s)")));
|
||||
|
Loading…
x
Reference in New Issue
Block a user