fix: use more meaningful tag name

This commit is contained in:
YiFang Xiao 2023-10-08 23:34:08 +08:00
parent 6f9fa8eaa7
commit 7ec51d9453

View file

@ -960,7 +960,8 @@ void MdxDictionary::replaceLinks( QString & id, QString & article )
//linkType in ("script","img","source","audio","video") //linkType in ("script","img","source","audio","video")
// javascripts and images // javascripts and images
QRegularExpressionMatch match = RX::Mdx::inlineScriptRe.match( linkTxt ); 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() ) { && match.hasMatch() && match.capturedLength() == linkTxt.length() ) {
// skip inline scripts // skip inline scripts
articleNewText += linkTxt; articleNewText += linkTxt;