[Mono-bugs] [Bug 52522][Blo] New - <%= xxx %> tag not processed in client javascript block in aspx
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Tue, 23 Dec 2003 18:21:36 -0500 (EST)
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by liyul@hotmail.com.
http://bugzilla.ximian.com/show_bug.cgi?id=52522
--- shadow/52522 2003-12-23 18:21:36.000000000 -0500
+++ shadow/52522.tmp.8191 2003-12-23 18:21:36.000000000 -0500
@@ -0,0 +1,76 @@
+Bug#: 52522
+Product: Mono/Class Libraries
+Version: unspecified
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Blocker
+Component: System.Web
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: liyul@hotmail.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: <%= xxx %> tag not processed in client javascript block in aspx
+
+If there are <%=var%> in javascript block, they will be left there not
+processed. It is a rather major issue with aspx compatibility.
+
+bug: In AspGenerator.cs, the TextParsed method deliberately skip processing
+ <% in server-side or client scripts.
+
+ void TextParsed (ILocation location, string text)
+ {
+ if (text.IndexOf ("<%") != -1 && !inScript && !javascript) {
+ if (this.text.Length > 0)
+ FlushText ();
+ CodeRenderParser r = new CodeRenderParser (text, stack.Builder);
+ r.AddChildren ();
+ return;
+ }
+
+ this.text.Append (text);
+ //PrintLocation (location);
+ }
+
+Temporary fix enclosed seemed to be working, but need further scrutinzation.
+
+ void TextParsed (ILocation location, string text)
+ {
+ //PrintLocation (location);
+ PrintLocation(location);
+
+ if (text.IndexOf ("<%") != -1)
+ {
+ if (inScript)
+ {
+ // FIXME:
+ this.text.Append (text);
+ }
+ else if (javascript)
+ {
+ // FIXME:
+ // this.text.Append (text);
+ if (this.text.Length > 0)
+ FlushText ();
+ CodeRenderParser r = new CodeRenderParser (text, stack.Builder);
+ r.AddChildren ();
+ return;
+ }
+ else
+ {
+ if (this.text.Length > 0)
+ FlushText ();
+ CodeRenderParser r = new CodeRenderParser (text, stack.Builder);
+ r.AddChildren ();
+ return;
+ }
+ }
+ else
+ {
+ this.text.Append (text);
+ }
+ }