+2009-08-15 Marek Habersack <mhabersack@novell.com>
+
+ * Makefile (TEST_RESOURCE_FILES): added
+ Test/mainsoft/NunitWebResources/NewlineInCodeExpression.aspx
+
2009-07-30 Raja R Harinath <harinath@hurrynot.org>
* Makefile ($(build_lib)): Move cyclic dependencies onto this.
Test/mainsoft/NunitWebResources/PreprocessorDirectivesInMarkup.aspx \
Test/mainsoft/NunitWebResources/UnquotedAngleBrackets.aspx \
Test/mainsoft/NunitWebResources/FullTagsInText.aspx \
- Test/mainsoft/NunitWebResources/TagsExpressionsAndCommentsInText.aspx
+ Test/mainsoft/NunitWebResources/TagsExpressionsAndCommentsInText.aspx \
+ Test/mainsoft/NunitWebResources/NewlineInCodeExpression.aspx
RESX_DIST = resources/TranslationResources.resx
ifneq (1, $(FRAMEWORK_VERSION_MAJOR))
void DoParseExpressions (string str)
{
int startIndex = 0, index = 0;
- Regex codeDirective = new Regex ("(<%(?!@)(?<code>.*?)%>)|(<[\\w:\\.]+.*?runat=[\"']?server[\"']?.*?/>)",
+ Regex codeDirective = new Regex ("(<%(?!@)(?<code>(.|\\s)*?)%>)|(<[\\w:\\.]+.*?runat=[\"']?server[\"']?.*?/>)",
RegexOptions.Multiline | RegexOptions.Compiled | RegexOptions.CultureInvariant);
Match match;
int strLen = str.Length;
+2009-08-15 Marek Habersack <mhabersack@novell.com>
+
+ * AspGenerator.cs: CodeRenderParser.DoParseExpressions - match
+ newline characters inside expressions. Fixes bug #526449
+
2009-08-14 Marek Habersack <mhabersack@novell.com>
* BuildManagerDirectoryBuilder.cs: when VirtualPathProvider
WebTest.CopyResource (GetType (), "UnquotedAngleBrackets.aspx", "UnquotedAngleBrackets.aspx");
WebTest.CopyResource (GetType (), "FullTagsInText.aspx", "FullTagsInText.aspx");
WebTest.CopyResource (GetType (), "TagsExpressionsAndCommentsInText.aspx", "TagsExpressionsAndCommentsInText.aspx");
+ WebTest.CopyResource (GetType (), "NewlineInCodeExpression.aspx", "NewlineInCodeExpression.aspx");
#if NET_2_0
WebTest.CopyResource (GetType (), "InvalidPropertyBind1.aspx", "InvalidPropertyBind1.aspx");
WebTest.CopyResource (GetType (), "InvalidPropertyBind2.aspx", "InvalidPropertyBind2.aspx");
// Just test if it doesn't throw an exception
new WebTest ("PreprocessorDirectivesInMarkup.aspx").Run ();
}
-#endif
+ [Test (Description="Bug #526449")]
+ public void NewlineInCodeExpression ()
+ {
+ string pageHtml = new WebTest ("NewlineInCodeExpression.aspx").Run ();
+ string renderedHtml = HtmlDiff.GetControlFromPageHtml (pageHtml);
+ string originalHtml = "<a href=\"test\">bla</a>";
+ HtmlDiff.AssertAreEqual (originalHtml, renderedHtml, "#A1");
+ }
+#endif
+
[Test (Description="Bug #517656")]
public void ServerControlInClientSideComment ()
{
--- /dev/null
+<%@ Page Language="C#" AutoEventWireup="true" %>
+
+<!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 runat="server">
+ <title></title>
+</head>
+<body>
+ <form id="form1" runat="server">
+ <div>
+ <%= MonoTests.stand_alone.WebHarness.HtmlDiff.BEGIN_TAG %><a href="<%= "test"
+ %>">bla</a><%= MonoTests.stand_alone.WebHarness.HtmlDiff.END_TAG %>
+ </div>
+ </form>
+</body>
+</html>