Page template does not accept a valid XHTML 1.0 page
Hi all, When I try to add the following XHTML code, Zope 2.6.1 tells me that a parsing error occured : Compilation failed TAL.HTMLParser.HTMLParseError: bad end tag: "</SCR' + 'IPT\\>", at line 28, column 18 I tried to modified this line but other problems then occur. Here is the XHTML page: <?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>gameStory</title> </head> <body bgcolor="#FFF1C1"> <script language="JavaScript1.1" type="text/JavaScript1.1"> <!-- var MM_contentVersion = 6; var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0; if ( plugin ) { var words = navigator.plugins["Shockwave Flash"].description.split(" "); for (var i = 0; i < words.length; ++i) { if (isNaN(parseInt(words[i]))) continue; var MM_PluginVersion = words[i]; } var MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion; } else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 && (navigator.appVersion.indexOf("Win") != -1)) { document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n'); //FS hide this from IE4.5 Mac by splitting the tag document.write('on error resume next \n'); document.write('MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n'); document.write('</SCR' + 'IPT\> \n'); } if ( MM_FlashCanPlay ) { document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'); document.write(' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflas h.cab#version=6,0,0,0" '); document.write(' ID="gameStory" WIDTH="700" HEIGHT="500" ALIGN="">'); document.write(' <PARAM NAME=movie VALUE="gameStory.swf" /> <PARAM NAME=quality VALUE=high /> <PARAM NAME=bgcolor VALUE=#FFF1C1 /> '); document.write(' <EMBED src="gameStory.swf" quality=high bgcolor=#FFF1C1 '); document.write(' swLiveConnect=FALSE WIDTH="700" HEIGHT="500" NAME="gameStory" ALIGN=""'); document.write(' TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">'); document.write(' </EMBED>'); document.write(' </OBJECT>'); } else{ document.write('<IMG SRC="gameStory.gif" WIDTH="700" HEIGHT="500" usemap="#gameStory" BORDER=0 />'); } //--> </script><noscript> </noscript> </body> </html> Regards, -- Jean ########################################### This message has been scanned by ICT
BALTUS Jean wrote:
Hi all,
When I try to add the following XHTML code, Zope 2.6.1 tells me that a parsing error occured :
Compilation failed
TAL.HTMLParser.HTMLParseError: bad end tag: "</SCR' + 'IPT\\>", at line 28, column 18
Hello, I don't know if this is a bug, but here comes two possible solutions: A) If you need an inline JavaScript, create a File object and insert your JS code there. In the zpt you can call it like: <script type="text/JavaScript" tal:content="structure here/my_js_file"
</script>
B) Use the src attribute of the <script> tag. (recommended) Tonico
participants (2)
-
BALTUS Jean -
Tonico Strasser