diff --git a/bbcode.go b/bbcode.go index 07d4898..afcbef9 100644 --- a/bbcode.go +++ b/bbcode.go @@ -77,7 +77,10 @@ func (this *BBCodeRenderer) bbcode(data string) string { pregReplaceRule{regexp.MustCompile(`(?si)\[\*\]`), `
  • `}, pregReplaceRule{regexp.MustCompile(`(?si)\[url=(.*?)\](.*?)\[/url\]`), `$2`}, pregReplaceFunc{regexp.MustCompile(`(?si)\[article=(.*?)\](.*?)\[/article\]`), func(m []string) string { - return `` + m[2] + `` + // m[1] has already been hesc'd + // Need to unhesc, and then pathescape + targetArticle := html.UnescapeString(m[1]) + return `` + m[2] + `` }}, pregReplaceFunc{regexp.MustCompile(`(?si)\[rev=(.*?)\](.*?)\[/rev\]`), func(m []string) string { return `` + m[2] + ``