Author: mhabersack
Date: 2007-07-02 07:40:40 -0400 (Mon, 02 Jul 2007)
New Revision: 81172
Modified:
trunk/mcs/class/System.Web/System.Web.Compilation/ChangeLog
trunk/mcs/class/System.Web/System.Web.Compilation/TemplateControlCompiler.cs
Log:
2007-07-02 Marek Habersack <[EMAIL PROTECTED]>
* TemplateControlCompiler.cs: don't use StartWith to see if a
variable's value is a bind expression, as it erroneously renames
all calls to methods starting with the string Bind. Use a regular
expression now instead. Fixes bug #81928.
Modified: trunk/mcs/class/System.Web/System.Web.Compilation/ChangeLog
===================================================================
--- trunk/mcs/class/System.Web/System.Web.Compilation/ChangeLog 2007-07-02
11:09:09 UTC (rev 81171)
+++ trunk/mcs/class/System.Web/System.Web.Compilation/ChangeLog 2007-07-02
11:40:40 UTC (rev 81172)
@@ -1,3 +1,10 @@
+2007-07-02 Marek Habersack <[EMAIL PROTECTED]>
+
+ * TemplateControlCompiler.cs: don't use StartWith to see if a
+ variable's value is a bind expression, as it erroneously renames
+ all calls to methods starting with the string Bind. Use a regular
+ expression now instead. Fixes bug #81928.
+
2007-06-20 Marek Habersack <[EMAIL PROTECTED]>
* AppResourcesCompiler.cs: use HttpRuntime.InternalCache to keep
Modified:
trunk/mcs/class/System.Web/System.Web.Compilation/TemplateControlCompiler.cs
===================================================================
---
trunk/mcs/class/System.Web/System.Web.Compilation/TemplateControlCompiler.cs
2007-07-02 11:09:09 UTC (rev 81171)
+++
trunk/mcs/class/System.Web/System.Web.Compilation/TemplateControlCompiler.cs
2007-07-02 11:40:40 UTC (rev 81172)
@@ -65,6 +65,7 @@
#if NET_2_0
static Regex bindRegex = new Regex
(@"Bind\s*\(""(.*?)""\)\s*%>", RegexOptions.Compiled | RegexOptions.IgnoreCase);
+ static Regex bindRegexInValue = new Regex
(@"Bind\s*\(""(.*?)""\)", RegexOptions.Compiled | RegexOptions.IgnoreCase);
#endif
public TemplateControlCompiler (TemplateControlParser parser)
@@ -427,8 +428,11 @@
bool need_if = false;
value = value.Trim ();
if (StrUtils.StartsWith (value, "Bind", true)) {
- value = "Eval" + value.Substring (4);
- need_if = true;
+ Match match = bindRegexInValue.Match (value);
+ if (match.Success) {
+ value = "Eval" + value.Substring (4);
+ need_if = true;
+ }
}
#endif
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches