[Github Mobile]: A PR comment containing specific a HTML element (e.g., <button>, <script>) will not show text after HTML element #41555
-
Is there a way to escape the HTML elements and treat them as text? I'm assuming the comment is sanitized to prevent stored XSS attacks. If it is not possible, no worries. |
Beta Was this translation helpful? Give feedback.
Answered by
airtower-luna
Dec 12, 2022
Replies: 7 comments 4 replies
-
If you escape the < it will show as text, and then the rest too because it isn't an HTML element any more. You can simply add a backslash in front of it, or wrap the whole element in backticks to put it into a code section (this is what I'd prefer). Example:
Renders as: <button> |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
meck93
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as disruptive content.
This comment was marked as disruptive content.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you escape the < it will show as text, and then the rest too because it isn't an HTML element any more. You can simply add a backslash in front of it, or wrap the whole element in backticks to put it into a code section (this is what I'd prefer).
Example:
Renders as:
<button>
<button>