diff options
Diffstat (limited to 'src/browsertab.cpp')
| -rw-r--r-- | src/browsertab.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/browsertab.cpp b/src/browsertab.cpp index 92f3b7d..997f10b 100644 --- a/src/browsertab.cpp +++ b/src/browsertab.cpp @@ -805,7 +805,11 @@ void BrowserTab::updatePageTitle() } } - // TODO: Shorten lengthy titles? + // This will strip new-line characters from the title, in case + // there are any. + static const QRegularExpression NL_REGEX = QRegularExpression("\n"); + page_title.replace(NL_REGEX, ""); + page_title = page_title.trimmed(); emit this->titleChanged(this->page_title); } |
