pzdn2009 / syntaxhighlighter

Automatically exported from code.google.com/p/syntaxhighlighter
GNU General Public License v3.0
0 stars 0 forks source link

document.write confuses firefox during an xsl transformation #7

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. Set-up to render HTML by transforming an XML file with an XSL file
2. Render a language uses highlighter.Style (which causes a call to
document.write to write out the new styles).
NOTE: I've provided a test case which fails on Firefox with the current
code but succeeds with the provided patch.

What is the expected output? What do you see instead?

Expected is the highlighted text, instead (since the script fails right
before the highlighted text is inserted) nothing is seen.

The following error is logged in firebug:

element.parentNode has no properties
file:///.../syntaxhighlighter/Scripts/shCore.js
Line 693

What version of the product are you using? On what operating system?

1.5.0 -- as far as I know this fails on Firefox under all operating systems.

Please provide any additional information below.

Please see attached patch for fix and test case.

Original issue reported on code.google.com by jason.mo...@gmail.com on 27 May 2007 at 8:01

Attachments:

GoogleCodeExporter commented 9 years ago
This will also cause problem when dp.SyntaxHighlighter.HighlightAll is called 
after
the page is loaded, like called in body onload event.

Original comment by wctang on 28 Jun 2007 at 3:16

GoogleCodeExporter commented 9 years ago
Does the attached patch fix the problem?

Original comment by jason.mo...@gmail.com on 28 Jun 2007 at 6:57

GoogleCodeExporter commented 9 years ago

Original comment by alex.gor...@gmail.com on 28 Jun 2007 at 10:59

GoogleCodeExporter commented 9 years ago

Original comment by alex.gor...@gmail.com on 5 Aug 2007 at 12:40

GoogleCodeExporter commented 9 years ago

Original comment by alex.gor...@gmail.com on 5 Aug 2007 at 2:51