mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 19:24:08 +00:00
*! Switch to gdlookup://localhost/word scheme in dsl word references. This fixes
cases with uppercased/capitalized words.
This commit is contained in:
parent
9c5ac2613f
commit
e4e5a9693e
|
@ -14,6 +14,7 @@
|
|||
#include "fsencoding.hh"
|
||||
#include "audiolink.hh"
|
||||
#include "langcoder.hh"
|
||||
#include "wstring_qt.hh"
|
||||
|
||||
#include <zlib.h>
|
||||
#include "libzip/zip.h"
|
||||
|
@ -637,7 +638,13 @@ string DslDictionary::nodeToHtml( ArticleDom::Node const & node )
|
|||
else
|
||||
if ( node.tagName == GD_NATIVE_TO_WS( L"ref" ) )
|
||||
{
|
||||
result += "<a class=\"dsl_ref\" href=\"bword://" + Html::escape( Utf8::encode( node.renderAsText() ) ) +"\">" + processNodeChildren( node ) + "</a>";
|
||||
QUrl url;
|
||||
|
||||
url.setScheme( "gdlookup" );
|
||||
url.setHost( "localhost" );
|
||||
url.setPath( gd::toQString( node.renderAsText() ) );
|
||||
|
||||
result += string( "<a class=\"dsl_ref\" href=\"" ) + url.toEncoded().data() +"\">" + processNodeChildren( node ) + "</a>";
|
||||
}
|
||||
else
|
||||
if ( node.tagName == GD_NATIVE_TO_WS( L"sub" ) )
|
||||
|
|
Loading…
Reference in a new issue