X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d699f48ba33c96c24f7ab3764ad98ded0633c1c5..b09bda689c8525886d217a9b171b354391cd6d78:/src/html/htmlpars.cpp?ds=sidebyside diff --git a/src/html/htmlpars.cpp b/src/html/htmlpars.cpp index 64054fc2d2..cf6897d335 100644 --- a/src/html/htmlpars.cpp +++ b/src/html/htmlpars.cpp @@ -80,8 +80,9 @@ wxHtmlParser::wxHtmlParser() wxHtmlParser::~wxHtmlParser() { - while (RestoreState()) - DestroyDOMTree(); + while (RestoreState()) {} + DestroyDOMTree(); + delete m_HandlersStack; m_HandlersHash.Clear(); m_HandlersList.DeleteContents(TRUE); @@ -271,8 +272,9 @@ void wxHtmlParser::DoParsing(int begin_pos, int end_pos) pieces[m_CurTextPiece].m_pos < m_CurTag->GetBeginPos())) { // Add text: - AddText(m_Source.Mid(pieces[m_CurTextPiece].m_pos, - pieces[m_CurTextPiece].m_lng)); + AddText(GetEntitiesParser()->Parse( + m_Source.Mid(pieces[m_CurTextPiece].m_pos, + pieces[m_CurTextPiece].m_lng))); begin_pos = pieces[m_CurTextPiece].m_pos + pieces[m_CurTextPiece].m_lng; m_CurTextPiece++; @@ -385,6 +387,8 @@ bool wxHtmlParser::RestoreState() { if (!m_SavedStates) return FALSE; + DestroyDOMTree(); + wxHtmlParserState *s = m_SavedStates; m_SavedStates = s->m_nextState;