fixed 'url' field extraction to be done for wxHtmlWindow only (bug #1741900)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46933 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík 2007-06-25 12:16:20 +00:00
parent 950905affd
commit 9ec6078f41

View File

@ -441,10 +441,6 @@ static bool NodeContainsFilename(wxXmlNode *node)
if ( name == _T("icon") )
return true;
// URLs in wxHtmlWindow:
if ( name == _T("url") )
return true;
// wxBitmapButton:
wxXmlNode *parent = node->GetParent();
if (parent != NULL &&
@ -464,6 +460,15 @@ static bool NodeContainsFilename(wxXmlNode *node)
return true;
}
// URLs in wxHtmlWindow:
if ( name == _T("url") &&
parent != NULL &&
parent->GetPropVal(_T("class"), _T("")) == _T("wxHtmlWindow") )
{
// FIXME: this is wrong for e.g. http:// URLs
return true;
}
return false;
}