mirror of
https://github.com/russross/blackfriday.git
synced 2024-03-22 13:40:34 +08:00
escape entities when using smartypants
This commit is contained in:
parent
3ee2b137f8
commit
de40da7ad6
|
@ -332,7 +332,7 @@ func rndr_smartypants(ob *bytes.Buffer, text []byte, opaque interface{}) {
|
||||||
for i := 0; i < len(text); i++ {
|
for i := 0; i < len(text); i++ {
|
||||||
if action := options.smartypants[text[i]]; action != nil {
|
if action := options.smartypants[text[i]]; action != nil {
|
||||||
if i > mark {
|
if i > mark {
|
||||||
ob.Write(text[mark:i])
|
attr_escape(ob, text[mark:i])
|
||||||
}
|
}
|
||||||
|
|
||||||
previous_char := byte(0)
|
previous_char := byte(0)
|
||||||
|
@ -345,6 +345,6 @@ func rndr_smartypants(ob *bytes.Buffer, text []byte, opaque interface{}) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if mark < len(text) {
|
if mark < len(text) {
|
||||||
ob.Write(text[mark:])
|
attr_escape(ob, text[mark:])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user