What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 131 Stack Exchange communities.

I want to embed an image of this beautiful unicorn.

<img src="http://i.stack.imgur.com/YHnAW.png"/>

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="http://i.stack.imgur.com/YHnAW.png"/>

… 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="http://i.stack.imgur.com/YHnAW.png" 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
5  
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

1 Answer 1

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,

src=""
width="" (up to 999)
height="" (up to 999)
alt=""
title=""

src must come before width and height.

share|improve this answer
2  
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
2  
@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
1  
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 .