diff --git a/gb.xml/src/xslt/CXSLT.cpp b/gb.xml/src/xslt/CXSLT.cpp index ea5a2414d..c67f04a96 100755 --- a/gb.xml/src/xslt/CXSLT.cpp +++ b/gb.xml/src/xslt/CXSLT.cpp @@ -86,7 +86,13 @@ BEGIN_METHOD(CXSLT_Transform,GB_OBJECT inputDoc;GB_OBJECT inputStyleSheet) xmlDocDumpFormatMemoryEnc(xmlOutDoc ,&buffer, &size, "UTF-8", 1); Document *outDoc = GBI::New("XmlDocument"); + try{ outDoc->setContent(StringToWString(string((char*)(buffer),size))); + } + catch(HTMLParseException &e) + { + outDoc->setContent(L""); + } GB.ReturnObject(outDoc);