diff --git a/mustache-sharp.test/FormatCompilerTester.cs b/mustache-sharp.test/FormatCompilerTester.cs index 72bcfee..3797b14 100644 --- a/mustache-sharp.test/FormatCompilerTester.cs +++ b/mustache-sharp.test/FormatCompilerTester.cs @@ -1476,6 +1476,17 @@ Odd Assert.AreEqual(expected, actual, "Value field didn't work"); } + [TestMethod] + public void TestCompile_UrlEncodeParam() { + FormatCompiler compiler = new FormatCompiler(); + const string format = @"{{#urlencode}}{{url}}{{/urlencode}}"; + Generator generator = compiler.Compile(format); + + string actual = generator.Render(new {url="https://google.com" }); + string expected = "https%3a%2f%2fgoogle.com"; + Assert.AreEqual(expected, actual, "Value field didn't work"); + } + [TestMethod] public void TestCompile_UrlDecode() { FormatCompiler compiler = new FormatCompiler();