From 85250bb6127734adfe383ef435e48934f92e2e86 Mon Sep 17 00:00:00 2001 From: Simon Wiles Date: Sun, 18 Mar 2012 11:17:49 -0700 Subject: [PATCH] Leave tags with data URIs alone (in Stardict type 'h' dictionaries). --- stardict.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stardict.cc b/stardict.cc index ddcd50d3..c27ddaa1 100644 --- a/stardict.cc +++ b/stardict.cc @@ -336,7 +336,7 @@ string StardictDictionary::handleResource( char type, char const * resource, siz string articleText = "
" + string( resource, size ) + "
"; return ( QString::fromUtf8( articleText.c_str() ) - .replace( QRegExp( "(<\\s*img\\s+[^>]*src\\s*=\\s*[\"']*)([^\"']*)", Qt::CaseInsensitive ), + .replace( QRegExp( "(<\\s*img\\s+[^>]*src\\s*=\\s*[\"']+)((?!data:)[^\"']*)", Qt::CaseInsensitive ), "\\1bres://" + QString::fromStdString( getId() ) + "/\\2" ) .toUtf8().data() ); }