Bug 110544, improving comment parsing by avioding string copies and other trickery. r=harishd, sr=jst, a=asa.
git-svn-id: svn://10.0.0.236/trunk@116687 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -1169,8 +1169,11 @@ NS_IMETHODIMP CViewSourceHTML::HandleToken(CToken* aToken,nsIParser* aParser) {
|
||||
|
||||
case eToken_comment:
|
||||
{
|
||||
const nsAReadableString& commentValue = aToken->GetStringValue();
|
||||
result=WriteTag(mCommentTag,commentValue,0,PR_TRUE);
|
||||
nsAutoString theStr;
|
||||
theStr.Assign(NS_LITERAL_STRING("<!--") +
|
||||
aToken->GetStringValue() +
|
||||
NS_LITERAL_STRING("-->") );
|
||||
result=WriteTag(mCommentTag,theStr,0,PR_TRUE);
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user