X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/420ec58abbf042de49ccde2253abd96dbc85c8ff..7ff14117cbfd017d73508f51b27495ee7e9189f3:/src/html/htmlfilter.cpp diff --git a/src/html/htmlfilter.cpp b/src/html/htmlfilter.cpp index ba3f0a84e4..508824b431 100644 --- a/src/html/htmlfilter.cpp +++ b/src/html/htmlfilter.cpp @@ -8,12 +8,11 @@ #ifdef __GNUG__ -#pragma implementation +#pragma implementation "htmlfilter.h" #endif -#include +#include "wx/wxprec.h" -#include "wx/defs.h" #if wxUSE_HTML #ifdef __BORDLANDC__ @@ -21,11 +20,11 @@ #endif #ifndef WXPRECOMP -#include +#include "wx/wx.h" #endif -#include -#include +#include "wx/html/htmlfilter.h" +#include "wx/html/htmlwin.h" /* @@ -125,7 +124,11 @@ IMPLEMENT_DYNAMIC_CLASS(wxHtmlFilterHTML, wxHtmlFilter) bool wxHtmlFilterHTML::CanRead(const wxFSFile& file) const { - return (file.GetMimeType() == "text/html"); +// return (file.GetMimeType() == "text/html"); +// This is true in most case but some page can return: +// "text/html; char-encoding=...." +// So we use Find instead + return (file.GetMimeType().Find(_T("text/html")) == 0); }