#include "wx/defs.h"
#if wxUSE_HTML && wxUSE_STREAMS
-#ifdef __BORDLANDC__
+#ifdef __BORLANDC__
#pragma hdrstop
#endif
wxHtmlWindow *wfr = (wxHtmlWindow*)(m_WParser->GetWindow());
if (wfr)
{
- wxString title = "";
- wxString *src = m_WParser->GetSource();
-
- for (int i = tag.GetBeginPos(); i < tag.GetEndPos1(); i++) title += (*src)[(unsigned int) i];
- wfr->OnSetTitle(title);
+ const wxString& src = *m_WParser->GetSource();
+ wfr->OnSetTitle(src.Mid(tag.GetBeginPos(),
+ tag.GetEndPos1()-tag.GetBeginPos()));
}
}
return TRUE;
+// Tag handler for tags that we have to ignore, otherwise non-text data
+// would show up as text:
+TAG_HANDLER_BEGIN(DoNothing, "SCRIPT")
+ TAG_HANDLER_PROC(tag)
+ {
+ return true;
+ }
+TAG_HANDLER_END(DoNothing)
TAGS_MODULE_ADD(TITLE)
TAGS_MODULE_ADD(BODY)
TAGS_MODULE_ADD(BLOCKQUOTE)
+ TAGS_MODULE_ADD(DoNothing)
TAGS_MODULE_END(Layout)