MDict: Support audio links in <area> tag

This commit is contained in:
Timon Wong 2013-04-30 09:30:04 +08:00
parent 4568c41ab1
commit 00a1ed5ddc

2
mdx.cc
View file

@ -825,7 +825,7 @@ string MdxDictionary::filterResource( const char * articleId, const char * artic
.replace( QRegExp( "(<\\s*a\\s+[^>]*(name|id)\\s*=\\s*[\"'])", Qt::CaseInsensitive ), .replace( QRegExp( "(<\\s*a\\s+[^>]*(name|id)\\s*=\\s*[\"'])", Qt::CaseInsensitive ),
"\\1" + uniquePrefix ) "\\1" + uniquePrefix )
// sounds, and audio link script // 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() ) ) + QString::fromStdString( addAudioLink( "\"gdau://" + getId() + "/\\2\"", getId() ) ) +
"\\1gdau://" + id + "/\\2" ) "\\1gdau://" + id + "/\\2" )
// stylesheets // stylesheets