Skip to content

Commit

Permalink
Fix HTML tags being allowed in RenderMarkdown even when allowHTML is …
Browse files Browse the repository at this point in the history
…false
  • Loading branch information
tulir committed Apr 29, 2021
1 parent 8cb0c0e commit eef0e65
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion format/markdown.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func RenderMarkdown(text string, allowMarkdown, allowHTML bool) event.MessageEve
htmlBody = strings.Replace(text, "\n", "<br>", -1)
}

if len(htmlBody) > 0 {
if len(htmlBody) > 0 && (allowMarkdown || allowHTML) {
text = HTMLToText(htmlBody)

if htmlBody != text {
Expand Down
2 changes: 1 addition & 1 deletion version.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package mautrix

const Version = "v0.9.9"
const Version = "v0.9.10"

var DefaultUserAgent = "mautrix-go/" + Version

0 comments on commit eef0e65

Please sign in to comment.