At the moment does Message#getContentStripped(); remove symbols like * if they format the text (For example *text* becomes text).
But sadly is that also the case when the symbol is escaped, what also makes it look weird (\*text* becomes \text)
Would it be possible, to change that in a way, that it won't remove the symbols, if they are escaped.
Adding spoilers to Message#getContentStripped would also be nice.
Released Issue: https://github.com/DV8FromTheWorld/JDA/issues/906
I'm currently working on something that could be used here: MarkdownSanitizer. This is still a WIP class but its probably a better approach to have a dedicated state-machine for sanitizing markdown formats.
Turns out markdown is even more complicated than I imagined. A simple state-machine won't work because something like "`abc **x**" requires a backtracking algorithm.
This is available as of 4.ALPHA.0_55
But would that now allow to make \*Your text* *And formatted text* become *Your text* And formatted text in Message#getContentStripped();?
That would have to be \*Your text\* *And formatted text* instead to be escaped correctly
Most helpful comment
Turns out markdown is even more complicated than I imagined. A simple state-machine won't work because something like "`abc **x**" requires a backtracking algorithm.