mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-24 04:24:09 +00:00
DSL: Fix links with multiple spaces
This commit is contained in:
parent
8f41079069
commit
c5f0f536fa
4
dsl.cc
4
dsl.cc
|
@ -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( '\"' );
|
||||||
|
|
Loading…
Reference in a new issue