m_CacheSize = 0;
m_CachePos = 0;
- int pos = 0;
- while (pos < lng)
+ for ( int pos = 0; pos < lng; pos++ )
{
if (src[pos] == wxT('<')) // tag found:
{
+ // don't cache comment tags
+ wxString::const_iterator iter = source.begin() + pos;
+ if ( wxHtmlParser::SkipCommentTag(iter, source.end()) )
+ {
+ pos = iter - source.begin();
+ continue;
+ }
+
if (m_CacheSize % CACHE_INCREMENT == 0)
m_Cache = (wxHtmlCacheItem*) realloc(m_Cache, (m_CacheSize + CACHE_INCREMENT) * sizeof(wxHtmlCacheItem));
int tg = m_CacheSize++;
}
}
}
-
- pos++;
}
// ok, we're done, now we'll free .Name members of cache - we don't need it anymore: