fix offsets in [html] tags

This commit is contained in:
mappu 2017-07-09 13:52:26 +12:00
parent af849d8bc6
commit 188088e2fb

View File

@ -166,6 +166,7 @@ func (this *BBCodeRenderer) displayfmt(s string) string {
if spos == -1 { if spos == -1 {
break break
} }
spos += hpos
ret += this.bbformat(s[hpos : spos-hpos]) ret += this.bbformat(s[hpos : spos-hpos])
spos += 6 spos += 6
@ -174,6 +175,7 @@ func (this *BBCodeRenderer) displayfmt(s string) string {
if epos == -1 { if epos == -1 {
break // no matching [/html] tag found break // no matching [/html] tag found
} }
epos += spos
jsonInnerContent, _ := json.Marshal(s[spos : epos-spos]) jsonInnerContent, _ := json.Marshal(s[spos : epos-spos])