mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-30 13:24:05 +00:00
fix: disable anchor default behavior (#1857)
* fix: prevent anchor link default behavior (in mdx dictionary)
This commit is contained in:
parent
047f725858
commit
e749a6077f
|
@ -920,8 +920,8 @@ void MdxDictionary::replaceLinks( QString & id, QString & article )
|
||||||
QRegularExpressionMatch match = RX::Mdx::audioRe.match( newLink );
|
QRegularExpressionMatch match = RX::Mdx::audioRe.match( newLink );
|
||||||
if ( match.hasMatch() ) {
|
if ( match.hasMatch() ) {
|
||||||
// sounds and audio link script
|
// sounds and audio link script
|
||||||
QString newTxt =
|
QString newTxt = match.captured( 1 ) + match.captured( 2 ) + "gdau://" + id + "/" + match.captured( 3 )
|
||||||
match.captured( 1 ) + match.captured( 2 ) + "gdau://" + id + "/" + match.captured( 3 ) + match.captured( 2 );
|
+ match.captured( 2 ) + R"( onclick="return false;" )";
|
||||||
newLink =
|
newLink =
|
||||||
QString::fromUtf8(
|
QString::fromUtf8(
|
||||||
addAudioLink( "\"gdau://" + getId() + "/" + match.captured( 3 ).toUtf8().data() + "\"", getId() ).c_str() )
|
addAudioLink( "\"gdau://" + getId() + "/" + match.captured( 3 ).toUtf8().data() + "\"", getId() ).c_str() )
|
||||||
|
|
Loading…
Reference in a new issue