http://bugzilla.novell.com/show_bug.cgi?id=588450
http://bugzilla.novell.com/show_bug.cgi?id=588450#c0 Summary: Parser error on less than symbol inside html comment inside script tag on aspx page Classification: Mono Product: Mono: Runtime Version: 2.6.x Platform: All OS/Version: All Status: NEW Severity: Normal Priority: P5 - None Component: misc AssignedTo: [email protected] ReportedBy: [email protected] QAContact: [email protected] Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.6) Gecko/20091216 Iceweasel/3.5.8 (like Firefox/3.5.8) Noticed this problem after updating to mono 2.6.1. A less than symbol inside a HTML comment, inside a <script> tag on an aspx page is somehow expanded by the parser and results in an error message when there is no matching greater than symbol Reproducible: Always Steps to Reproduce: This works fine and both the asp and javascript function correctly: <html> <head> </head> <body> <pre> <script type="text/javascript"> var a = 0; var b = 1; if (a < b) { document.write("javascript\n"); } </script> <% Response.Write("asp\n"); %> </pre> </body> </html> This hits the parser error <html> <head> </head> <body> <pre> <script type="text/javascript"> <!-- var a = 0; var b = 1; if (a < b) { document.write("javascript\n"); } --> </script> <% Response.Write("asp\n"); %> </pre> </body> </html> Oddly enough, if I flip the conditional around, it starts working again (although if you look at the page source you'll see that the HTML comment tags have disappeared) <html> <head> </head> <body> <pre> <script type="text/javascript"> <!-- var a = 0; var b = 1; if (b > a) { document.write("javascript\n"); } --> </script> <% Response.Write("asp\n"); %> </pre> </body> </html> Actual Results: This is the error message I get Server Error in '/' Application Expecting > and got EOF. Description: HTTP 500. Error processing request. Stack Trace: System.Web.Compilation.ParseException: Expecting > and got EOF. at System.Web.Compilation.AspGenerator.ParseError (ILocation location, System.String message) [0x00000] in <filename unknown>:0 at System.Web.Compilation.AspParser.OnError (System.String msg) [0x00000] in <filename unknown>:0 at System.Web.Compilation.AspParser.GetVerbatim (Int32 token, System.String end) [0x00000] in <filename unknown>:0 at System.Web.Compilation.AspParser.GetTag (System.Web.Compilation.TagType& tagtype, System.String& id, System.Web.Compilation.TagAttributes& attributes) [0x00000] in <filename unknown>:0 at System.Web.Compilation.AspParser.Parse () [0x00000] in <filename unknown>:0 at System.Web.Compilation.AspGenerator.TextParsed (ILocation location, System.String text) [0x00000] in <filename unknown>:0 at System.Web.Compilation.AspParser.OnTextParsed (System.String text) [0x00000] in <filename unknown>:0 at System.Web.Compilation.AspParser.Parse () [0x00000] in <filename unknown>:0 at System.Web.Compilation.AspGenerator.Parse (System.IO.TextReader reader, System.String filename, Boolean doInitParser) [0x00000] in <filename unknown>:0 at System.Web.Compilation.GenericBuildProvider`1[TParser].Parse () [0x00000] in <filename unknown>:0 at System.Web.Compilation.GenericBuildProvider`1[TParser].get_LanguageName () [0x00000] in <filename unknown>:0 at System.Web.Compilation.TemplateBuildProvider.get_LanguageName () [0x00000] in <filename unknown>:0 at System.Web.Compilation.GenericBuildProvider`1[TParser].get_CodeCompilerType () [0x00000] in <filename unknown>:0 at System.Web.Compilation.BuildManagerDirectoryBuilder.GetBuildProviderCodeDomType (System.Web.Compilation.BuildProvider bp) [0x00000] in <filename unknown>:0 at System.Web.Compilation.BuildManagerDirectoryBuilder.AssignToGroup (System.Web.Compilation.BuildProvider buildProvider, System.Collections.Generic.List`1 groups) [0x00000] in <filename unknown>:0 at System.Web.Compilation.BuildManagerDirectoryBuilder.Build (Boolean single) [0x00000] in <filename unknown>:0 at System.Web.Compilation.BuildManager.BuildInner (System.Web.VirtualPath vp, Boolean debug) [0x00000] in <filename unknown>:0 at System.Web.Compilation.BuildManager.Build (System.Web.VirtualPath vp) [0x00000] in <filename unknown>:0 at System.Web.Compilation.BuildManager.GetCompiledType (System.Web.VirtualPath virtualPath) [0x00000] in <filename unknown>:0 at System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath (System.Web.VirtualPath virtualPath, System.Type requiredBaseType) [0x00000] in <filename unknown>:0 at System.Web.UI.PageParser.GetCompiledPageInstance (System.String virtualPath, System.String inputFile, System.Web.HttpContext context) [0x00000] in <filename unknown>:0 at System.Web.UI.PageHandlerFactory.GetHandler (System.Web.HttpContext context, System.String requestType, System.String url, System.String path) [0x00000] in <filename unknown>:0 at System.Web.HttpApplication.GetHandler (System.Web.HttpContext context, System.String url, Boolean ignoreContextHandler) [0x00000] in <filename unknown>:0 at System.Web.HttpApplication.GetHandler (System.Web.HttpContext context, System.String url) [0x00000] in <filename unknown>:0 at System.Web.HttpApplication+<Pipeline>c__Iterator2.MoveNext () [0x00000] in <filename unknown>:0 Expected Results: Mono should be ignoring the <script> tag entirely. All thress versions should behave identically and display both "javascript" and "asp". -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. You are the assignee for the bug. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
