X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9e2bd1354aaf6148e76b167bd02970956376b5cb..7182d62a0292d606fba8b13c536d0552d278c846:/src/html/htmlpars.cpp diff --git a/src/html/htmlpars.cpp b/src/html/htmlpars.cpp index b1da8c92df..ea7f38d865 100644 --- a/src/html/htmlpars.cpp +++ b/src/html/htmlpars.cpp @@ -432,12 +432,27 @@ bool wxHtmlParser::RestoreState() return true; } +wxString wxHtmlParser::GetInnerSource(const wxHtmlTag& tag) +{ + return GetSource()->Mid(tag.GetBeginPos(), + tag.GetEndPos1() - tag.GetBeginPos()); +} + //----------------------------------------------------------------------------- // wxHtmlTagHandler //----------------------------------------------------------------------------- IMPLEMENT_ABSTRACT_CLASS(wxHtmlTagHandler,wxObject) +void wxHtmlTagHandler::ParseInnerSource(const wxString& source) +{ + // It is safe to temporarily change the source being parsed, + // provided we restore the state back after parsing + m_Parser->SetSourceAndSaveState(source); + m_Parser->DoParsing(); + m_Parser->RestoreState(); +} + //----------------------------------------------------------------------------- // wxHtmlEntitiesParser