Explorar el Código

2009-03-16 Marek Habersack <[email protected]>

	* AspGenerator.cs:
	TagParsed now better handles <script> tags. For both server and
	client tags ProcessScript is called and the input text, in case of
	client tags, is read verbatim to be processed when ProcessScript
	is called to close the tag. At this point the verbatim text is
	checked whether it contains server-side tags and/or expressions.

svn path=/trunk/mcs/; revision=129491
Marek Habersack hace 17 años
padre
commit
549f07d36b

+ 5 - 3
mcs/class/System.Web/System.Web.Compilation/AspGenerator.cs

@@ -537,10 +537,12 @@ namespace System.Web.Compilation
 
 			if (0 == String.Compare (tagid, "script", true, CultureInfo.InvariantCulture)) {
 				bool in_script = (inScript || ignore_text);
-				if (in_script || tagtype != TagType.Close) {
-					if ((in_script || (attributes != null && attributes.IsRunAtServer ())) && ProcessScript (tagtype, attributes))
+				if (in_script) {
+					if (ProcessScript (tagtype, attributes))
+						return;
+				} else
+					if (ProcessScript (tagtype, attributes))
 						return;
-				}
 			}
 
 			lastTag = tagtype;

+ 5 - 0
mcs/class/System.Web/System.Web.Compilation/ChangeLog

@@ -8,6 +8,11 @@
 	necessary as we might be passed JavaScript code and without
 	understanding its syntax we'll confuse the '<' character for the
 	start of a tag.
+	TagParsed now better handles <script> tags. For both server and
+	client tags ProcessScript is called and the input text, in case of
+	client tags, is read verbatim to be processed when ProcessScript
+	is called to close the tag. At this point the verbatim text is
+	checked whether it contains server-side tags and/or expressions.
 
 2009-03-12  Marek Habersack  <[email protected]>