DSL: Fix links with multiple spaces

This commit is contained in:
Abs62 2022-09-05 18:38:03 +03:00
parent 8f41079069
commit c5f0f536fa

4
dsl.cc
View file

@ -1152,7 +1152,9 @@ string DslDictionary::nodeToHtml( ArticleDom::Node const & node )
url.setScheme( "gdlookup" ); url.setScheme( "gdlookup" );
url.setHost( "localhost" ); 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() ) if( !node.tagAttrs.empty() )
{ {
QString attr = gd::toQString( node.tagAttrs ).remove( '\"' ); QString attr = gd::toQString( node.tagAttrs ).remove( '\"' );