diff --git a/mozilla/htmlparser/src/nsParser.cpp b/mozilla/htmlparser/src/nsParser.cpp index 0339282c0cf..bb5673a8a2c 100644 --- a/mozilla/htmlparser/src/nsParser.cpp +++ b/mozilla/htmlparser/src/nsParser.cpp @@ -1138,6 +1138,15 @@ nsresult nsParser::OnDataAvailable(nsIURI* aURL, nsIInputStream *pIStream, PRUin if(mParserFilter) mParserFilter->RawBuffer(mParserContext->mTransferBuffer, &theNumRead); + // XXX Hack --- NULL character(s) is(are) seen in the middle of the buffer!!! + // For now, I'm conditioning the raw buffer by removing the unwanted null chars. + // Problem could be NECKO related + + for(PRUint32 i=0;imTransferBuffer[i]==kNullCh) + mParserContext->mTransferBuffer[i]=kSpace; + } + #ifdef NS_DEBUG int index=0; for(index=0;index<10;index++) diff --git a/mozilla/parser/htmlparser/src/nsParser.cpp b/mozilla/parser/htmlparser/src/nsParser.cpp index 0339282c0cf..bb5673a8a2c 100644 --- a/mozilla/parser/htmlparser/src/nsParser.cpp +++ b/mozilla/parser/htmlparser/src/nsParser.cpp @@ -1138,6 +1138,15 @@ nsresult nsParser::OnDataAvailable(nsIURI* aURL, nsIInputStream *pIStream, PRUin if(mParserFilter) mParserFilter->RawBuffer(mParserContext->mTransferBuffer, &theNumRead); + // XXX Hack --- NULL character(s) is(are) seen in the middle of the buffer!!! + // For now, I'm conditioning the raw buffer by removing the unwanted null chars. + // Problem could be NECKO related + + for(PRUint32 i=0;imTransferBuffer[i]==kNullCh) + mParserContext->mTransferBuffer[i]=kSpace; + } + #ifdef NS_DEBUG int index=0; for(index=0;index<10;index++)