From de40da7ad692f7fb0c81bbc68ad49d27217c49f7 Mon Sep 17 00:00:00 2001 From: Russ Ross Date: Sat, 28 May 2011 22:39:22 -0600 Subject: [PATCH] escape entities when using smartypants --- smartypants.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/smartypants.go b/smartypants.go index 745e8d6..a9f282a 100644 --- a/smartypants.go +++ b/smartypants.go @@ -332,7 +332,7 @@ func rndr_smartypants(ob *bytes.Buffer, text []byte, opaque interface{}) { for i := 0; i < len(text); i++ { if action := options.smartypants[text[i]]; action != nil { if i > mark { - ob.Write(text[mark:i]) + attr_escape(ob, text[mark:i]) } previous_char := byte(0) @@ -345,6 +345,6 @@ func rndr_smartypants(ob *bytes.Buffer, text []byte, opaque interface{}) { } if mark < len(text) { - ob.Write(text[mark:]) + attr_escape(ob, text[mark:]) } }