Skip to content

Order of attributes on a HTML img tag can break preview rendering #105

@stevejalim

Description

@stevejalim

We've noticed (here) that using adding a HTML img tag with a width or height attribute along with an alt attr can fail to render a preview depending on the order of those attributes.

Steps to reproduce:

Using a pagedown-enabled textarea (e.g. the About me section in the Profile editor on StackOverflow.com), enter the following content:

1. <img src="https://placekitten.com/200/300" width="20" alt="This will show">
2. <img src="https://placekitten.com/200/300" alt="This will not show" width="20">
3. <img src="https://placekitten.com/200/300" width="20">

Expected result
Three numbered items, each with a small cat picture beside them

Actual result
Only the first and third images are shown:

Screenshot 2023-09-04 at 11 20 32

It's not critical, but it has caused us user confusion and pain. Hope this report helps - and thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions