From c5f0f536fae62bf56e0a8ae437ebcb65c5247a3f Mon Sep 17 00:00:00 2001 From: Abs62 Date: Mon, 5 Sep 2022 18:38:03 +0300 Subject: [PATCH] DSL: Fix links with multiple spaces --- dsl.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dsl.cc b/dsl.cc index ddf38045..3652544d 100644 --- a/dsl.cc +++ b/dsl.cc @@ -1152,7 +1152,9 @@ string DslDictionary::nodeToHtml( ArticleDom::Node const & node ) url.setScheme( "gdlookup" ); url.setHost( "localhost" ); - url.setPath( Qt4x5::Url::ensureLeadingSlash( gd::toQString( node.renderAsText() ) ) ); + wstring nodeStr = node.renderAsText(); + normalizeHeadword( nodeStr ); + url.setPath( Qt4x5::Url::ensureLeadingSlash( gd::toQString( nodeStr ) ) ); if( !node.tagAttrs.empty() ) { QString attr = gd::toQString( node.tagAttrs ).remove( '\"' );