From 79b55693014230053ffbdb1bd3ad7d13a6e2383a Mon Sep 17 00:00:00 2001 From: Pixel Date: Tue, 29 Nov 2011 18:33:07 -0800 Subject: Fixing Mustache's escaping (again). --- src/SimpleMustache.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/SimpleMustache.cc b/src/SimpleMustache.cc index 674cf71..97f8faa 100644 --- a/src/SimpleMustache.cc +++ b/src/SimpleMustache.cc @@ -477,8 +477,8 @@ Balau::String Balau::SimpleMustache::escape(const String & s) { for (int i = 0; i < s.strlen(); i++) { switch (s[i]) { - case '%': - *p++ = '%'; + case '&': + *p++ = '&'; *p++ = 'a'; *p++ = 'm'; *p++ = 'p'; @@ -496,7 +496,7 @@ Balau::String Balau::SimpleMustache::escape(const String & s) { *p++ = '&'; *p++ = '#'; *p++ = '3'; - *p++ = '5'; + *p++ = '9'; *p++ = ';'; break; case '\\': -- cgit v1.2.3