jehugaleahsa/mustache-sharp — pull request #36 by SquareWave (2014-11-05 23:50:30+00:00)
Title: Add support for escaped strings - closes #16

This is in line with standard mustache/handlebars. Double-mustache tags will be encoded with the provided IStringEncoder (defaults to PlainTextEncoder), while triple-mustache tags will be left as-is. This should be 100% backwards-compatible and passes all existing unit tests without modification.

Using HTML encoding looks like this, as defined in the test cases:

```csharp
var compiler = new FormatCompiler(new HtmlEncoder());
const string format = @"Hello, {{this}}";
var generator = compiler.Compile(format);
const string expected = @"Hello, <b>Bob</b>";
var actual = generator.Render("Bob");
Assert.AreEqual(expected, actual);
```

Escaping looks like this:
```csharp
var compiler = new FormatCompiler(new HtmlEncoder());
const string format = @"Hello, {{{this}}}";
var generator = compiler.Compile(format);
const string expected = @"Hello, Bob";
var actual = generator.Render("Bob");
Assert.AreEqual(expected, actual);
```