Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 158 Stack Exchange communities.

What is meta?
Here's how it works:
  1. Any Stack Exchange user can ask a question
  2. The community provides support, votes on ideas, and reports bugs
  3. Your voice helps shape the way Stack Exchange operates

I want to embed an image of this beautiful unicorn.

<img src=""/>

Perfect! Now, it's a little too … majestic, so I'd like to make it smaller. Markdown doesn't support it, but we can use HTML, right?

<img width="100" src=""/>

… but where's the image? It's just not displayed! Check the source code of this question to see it. So, let's shuffle those attributes around:

<img src="" width="100"/>

Now it works! Obviously, the attribute position matters, and the image is just not displayed. As we all know, the position of attributes shouldn't matter, therefore, please make it possible to specify width (and other allowed attributes) anywhere inside the tag.

share|improve this question
I like green unicorns. – Andrew Barber Feb 6 '12 at 10:26
I'm inexplicably compelled to upvote your comment @AndrewBarber. – jadarnel27 Feb 6 '12 at 14:22

I'm quite sure this is . Quoting from What HTML tags are allowed on Stack Exchange sites?:

You must enter the tags exactly as shown. Any deviation from this list (adding extra spaces, using single quote or no quotes, etc) means the tag will be stripped.

From the list,

width="" (up to 999)
height="" (up to 999)

src must come before width and height.

share|improve this answer
Yep. It's pretty strict, but it makes the sanitizer implementation very straightforward. – Tim Stone Feb 6 '12 at 14:09
Well, it still manifests like a bug though – and there's a difference between "straightforward" and inflexible :) The question you linked to does not explicitly state that the ordering of attributes needs to be like this. – slhck Feb 6 '12 at 14:46
@slhck Uh, yes it does. Okay, maybe Jeff might have confused terms "tags" and "attribute", but I'm quite sure he meant the attributes must be entered in that order. – Yi Jiang Feb 6 '12 at 14:52
Concerning attributes, it only mentions The following attributes are allowed – nothing about their order. Again, it does not explicitly say anything. Not that it matters, but it's not that obvious from the description and apparently a very unusual form of sanitizing. – slhck Feb 6 '12 at 14:55
@slhck I think he's referring to "You must enter the tags exactly as shown.". I think "changing the order of the attributes" should probably be added to the parenthetical list of examples to clarify. – jadarnel27 Feb 6 '12 at 15:02
I agree with keeping the sanitizer simple. But perhaps the user should be at least be notified about why their tag was stripped? – BlueRaja Feb 6 '12 at 23:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .