Skip to content

Commit

Permalink
fix: use more meaningful tag name
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoyifang committed Oct 8, 2023
1 parent 809ae74 commit a92fe71
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/dict/mdx.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a92fe71

Please sign in to comment.