Template with escaped double braces.

I added a test case for the issue #534 and rebase it.