From 00a1ed5ddc95690196af9db17f6a164b525411fb Mon Sep 17 00:00:00 2001 From: Timon Wong Date: Tue, 30 Apr 2013 09:30:04 +0800 Subject: [PATCH] MDict: Support audio links in tag --- mdx.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mdx.cc b/mdx.cc index 26823199..6390bf78 100644 --- a/mdx.cc +++ b/mdx.cc @@ -825,7 +825,7 @@ string MdxDictionary::filterResource( const char * articleId, const char * artic .replace( QRegExp( "(<\\s*a\\s+[^>]*(name|id)\\s*=\\s*[\"'])", Qt::CaseInsensitive ), "\\1" + uniquePrefix ) // sounds, and audio link script - .replace( QRegExp( "(<\\s*a\\s+[^>]*href\\s*=\\s*\")sound://([^\"']*)", Qt::CaseInsensitive ), + .replace( QRegExp( "(<\\s*(?:a|area)\\s+[^>]*href\\s*=\\s*\")sound://([^\"']*)", Qt::CaseInsensitive ), QString::fromStdString( addAudioLink( "\"gdau://" + getId() + "/\\2\"", getId() ) ) + "\\1gdau://" + id + "/\\2" ) // stylesheets