Skip to content

Commit

Permalink
Fix HTML entities being displayed in messages
Browse files Browse the repository at this point in the history
Initially reported in element-hq#6445. Fixes element-hq#6445.
This was a regression from element-hq#6357.

The fix is to enable Markwon's HTML entities processor.

Change-Id: I65588d6df24257851490161f4672f7461e6e5fc1
  • Loading branch information
cloudrac3r authored and SpiritCroc committed Jul 10, 2022
1 parent 489f1f5 commit ccc7f58
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ import io.noties.markwon.ext.latex.JLatexMathTheme
import io.noties.markwon.html.HtmlPlugin
import io.noties.markwon.image.AsyncDrawable
import io.noties.markwon.image.glide.GlideImagesPlugin
import io.noties.markwon.inlineparser.EntityInlineProcessor
import io.noties.markwon.inlineparser.HtmlInlineProcessor
import io.noties.markwon.inlineparser.MarkwonInlineParser
import io.noties.markwon.inlineparser.MarkwonInlineParserPlugin
Expand Down Expand Up @@ -134,7 +135,13 @@ class EventHtmlRenderer @Inject constructor(
}
.usePlugin(
MarkwonInlineParserPlugin.create(
MarkwonInlineParser.factoryBuilderNoDefaults().addInlineProcessor(HtmlInlineProcessor())
/* Configuring the Markwon inline formatting processor.
* Default settings are all Markdown features. Turn those off, only using the
* inline HTML processor and HTML entities processor.
*/
MarkwonInlineParser.factoryBuilderNoDefaults()
.addInlineProcessor(HtmlInlineProcessor()) // use inline HTML processor
.addInlineProcessor(EntityInlineProcessor()) // use HTML entities processor
)
)
.usePlugin(object : AbstractMarkwonPlugin() {
Expand Down

0 comments on commit ccc7f58

Please sign in to comment.