From 7ec51d9453585bbf1949fe98a649f2128c242a50 Mon Sep 17 00:00:00 2001 From: YiFang Xiao Date: Sun, 8 Oct 2023 23:34:08 +0800 Subject: [PATCH] fix: use more meaningful tag name --- src/dict/mdx.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/dict/mdx.cc b/src/dict/mdx.cc index c245f98c..8554db65 100644 --- a/src/dict/mdx.cc +++ b/src/dict/mdx.cc @@ -960,7 +960,8 @@ void MdxDictionary::replaceLinks( QString & id, QString & article ) //linkType in ("script","img","source","audio","video") // javascripts and images QRegularExpressionMatch match = RX::Mdx::inlineScriptRe.match( linkTxt ); - if ( linkType.at( 1 ) == 'c' // "script" tag + // "script" tag + if ( linkType.compare( "script" ) == 0 && match.hasMatch() && match.capturedLength() == linkTxt.length() ) { // skip inline scripts articleNewText += linkTxt;