Having certain characters in the alt text (as far as I tested, these are :, ", ') makes the alt-text on images not render. I suppose it's a parsing error returning undefined or an empty string.
Steps to reproduce (if necessary)
Steps to reproduce the behavior:
Mak a new post
Add an image [My alt text. That's very "funny".](/path/to/image)
Open the rendered post
The alt text ist missing
Add another image [My alt text. That is very funny.](/path/to/image)
I am also experiencing this behavior. It is very frustrating as someone who cares a lot about accessibility, because it makes writing accurate and concise alt-text very difficult.
I've looked into it, and narrowed the issue down to our HTML sanitization policy, which isn't currently allowing HTML entities inside the alt attribute of our rendered HTML. It's a one-line fix -- I'll try to submit that soon.
Previously, certain characters weren't allowed, and they would cause the entire
alt attribute to be elided from the rendered page. Since we safely sanitize the
content of this attribute anyway, this is unnecessary, so we now allow all text
entered there.
Fixes#649
Describe the bug
Having certain characters in the alt text (as far as I tested, these are
:
,"
,'
) makes the alt-text on images not render. I suppose it's a parsing error returningundefined
or an empty string.Steps to reproduce (if necessary)
Steps to reproduce the behavior:
[My alt text. That's very "funny".](/path/to/image)
[My alt text. That is very funny.](/path/to/image)
Expected behavior
The alt text should render regardless of the given input as long as it is compliant with W3 standards.
https://html.spec.whatwg.org/multipage/embedded-content.html#dom-img-alt
Application configuration
Version or last commit:
The text was updated successfully, but these errors were encountered: