Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] Code spans aren't HTML escaped in markdown posts #679

Closed
autumnull opened this issue Jun 28, 2022 · 1 comment · Fixed by #718
Closed

[bug] Code spans aren't HTML escaped in markdown posts #679

autumnull opened this issue Jun 28, 2022 · 1 comment · Fixed by #718
Labels
bug Something isn't working

Comments

@autumnull
Copy link
Contributor

Describe the bug with a clear and concise description of what the bug is.

When using the markdown format, code spans (like this) containing HTML aren't HTML-escaped during processing.

What's your GoToSocial Version?

v0.3.6

GoToSocial Arch

armv7 Binary

What happened?

making a post with the markdown format with the following contents

`Nobody tells you about the </code><del>SECRET CODE</del><code>, do they?`

results in a post with this content:

<p><code>Nobody tells you about the </code><del>SECRET CODE</del><code>, do they?</code></p>

which is rendered as this:

Nobody tells you about the SECRET CODE, do they?

What you expected to happen?

should result in the following HTML (or similar):

<p><code>Nobody tells you about the &lt;/code&gt;&lt;del&gt;SECRET CODE&lt;/del&gt;&lt;code&gt;, do they?</code></p>

which is rendered as this:

Nobody tells you about the </code><del>SECRET CODE</del><code>, do they?

How to reproduce it?

Get an oauth token, send a request to make a new post in markdown format with the content above.

Anything else we need to know?

No response

@autumnull autumnull added the bug Something isn't working label Jun 28, 2022
@tsmethurst
Copy link
Contributor

Thanks! I'll check it out soon :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants