void wx28HtmlParser::AddTag(const wx28HtmlTag& tag) { wx28HtmlTagHandler *h; bool inner = false; h = (wx28HtmlTagHandler*) m_HandlersHash.Get(tag.GetName()); if (h) { inner = h->HandleTag(tag); if (m_stopParsing) return; } if (!inner) { if (tag.HasEnding()) DoParsing(tag.GetBeginPos(), tag.GetEndPos1()); } }
bool wxMetaTagHandler::HandleTag(const wx28HtmlTag& tag) { if (tag.GetName() == wxT("BODY")) { m_Parser->StopParsing(); return false; } if (tag.HasParam(wxT("HTTP-EQUIV")) && tag.GetParam(wxT("HTTP-EQUIV")).IsSameAs(wxT("Content-Type"), false) && tag.HasParam(wxT("CONTENT"))) { wxString content = tag.GetParam(wxT("CONTENT")).Lower(); if (content.Left(19) == wxT("text/html; charset=")) { *m_retval = content.Mid(19); m_Parser->StopParsing(); } } return false; }