Hi,
{var text = [...]
"</head><body>" +
Die Zeichenkette "</" beendet den <script>-Teil.
Hier nicht, weil es sich um die rechte Seite neben einem "=" handelt, also den Kram, der einer Variablen zugewiesen werden soll.
Oh doch. Siehe http://www.w3.org/TR/html4/types.html#type-cdata, wo es heißt:
Although the STYLE and SCRIPT elements use CDATA for their data model, for these elements, CDATA must be handled differently by user agents. Markup and entities must be treated as raw text and passed to the application as is. The first occurrence of the character sequence "</" (end-tag open delimiter) is treated as terminating the end of the element's content. In valid documents, this would be the end tag for the element.
"The first occurrence", nicht "The first occurrence which appears not on the righthand side of an '='" (oder so ähnlich)
cu,
Andreas
Der Optimist: Das Glas ist halbvoll. - Der Pessimist: Das Glas ist halbleer. - Der Ingenieur: Das Glas ist doppelt so groß wie nötig.
http://mud-guard.de/? http://www.andreas-waechter.de/ http://www.helpers.de/