25660: don't copy JS comments onto plaintext clipboard. r=sfraser
git-svn-id: svn://10.0.0.236/trunk@64278 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -647,7 +647,7 @@ nsHTMLToTXTSinkStream::CloseContainer(const nsIParserNode& aNode)
|
||||
(type == eHTMLTag_pre) ||
|
||||
(type == eHTMLTag_blockquote)) {
|
||||
EnsureVerticalSpace(0);
|
||||
} else {
|
||||
} else if (type != eHTMLTag_script) {
|
||||
// All other blocks get 1 vertical space after them
|
||||
// in formatted mode, otherwise 0.
|
||||
// This is hard. Sometimes 0 is a better number, but
|
||||
@@ -755,6 +755,11 @@ nsHTMLToTXTSinkStream::AddLeaf(const nsIParserNode& aNode)
|
||||
// Might be nice, eventually, to output just the selected element.
|
||||
return NS_OK;
|
||||
}
|
||||
else if (mTagStackIndex > 0 && mTagStack[mTagStackIndex-1] == eHTMLTag_script)
|
||||
{
|
||||
// Don't output the contents of <script> tags;
|
||||
return NS_OK;
|
||||
}
|
||||
else if (type == eHTMLTag_text)
|
||||
{
|
||||
// Bug 31994 says we shouldn't output the contents of SELECT elements.
|
||||
|
||||
Reference in New Issue
Block a user