Skip to content

Commit

Permalink
opt: suppress url title
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoyifang committed Jun 27, 2024
1 parent 15cb327 commit 426d726
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/ui/articleview.cc
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ void ArticleView::loadFinished( bool result )

void ArticleView::handleTitleChanged( QString const & title )
{
if ( !title.isEmpty() )
if ( !title.isEmpty() && !title.contains("://"))
emit titleChanged( this, title );
}

Expand Down Expand Up @@ -1443,7 +1443,10 @@ void ArticleView::setContent( const QByteArray & data, const QString & mimeType,

QString ArticleView::getTitle()
{
return webview->page()->title();
auto title = webview->title();
if(title.contains("://"))
return {};
return webview->title();
}

QString ArticleView::getWord() const
Expand Down

0 comments on commit 426d726

Please sign in to comment.