wxHtmlParser::~wxHtmlParser()
{
- while (RestoreState())
- DestroyDOMTree();
+ while (RestoreState()) {}
+ DestroyDOMTree();
+
delete m_HandlersStack;
m_HandlersHash.Clear();
m_HandlersList.DeleteContents(TRUE);
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++;
{
if (!m_SavedStates) return FALSE;
+ DestroyDOMTree();
+
wxHtmlParserState *s = m_SavedStates;
m_SavedStates = s->m_nextState;