From 1dff1384bca35ac3c296b0568d28cab1650dac2b Mon Sep 17 00:00:00 2001 From: Konstantin Isakov Date: Fri, 29 May 2009 20:30:45 +0000 Subject: [PATCH] +! Fix handling requests with no link text. --- src/articleview.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/articleview.cc b/src/articleview.cc index 536cb721..594e10ff 100644 --- a/src/articleview.cc +++ b/src/articleview.cc @@ -342,9 +342,16 @@ void ArticleView::tryMangleWebsiteClickedUrl( QUrl & url, Contexts & contexts ) QUrl target; + QString queryWord = result.toString(); + + // Empty requests are treated as no request, so we work this around by + // adding a space. + if ( queryWord.isEmpty() ) + queryWord = " "; + target.setScheme( "gdlookup" ); target.setHost( "localhost" ); - target.setPath( "/" + result.toString() ); + target.setPath( "/" + queryWord ); url = target; }