While creating a question, I used quotes in an images alt text. It rendered correctly. To be sure that nothing was wrong, I opened up Chrome's Inspector on the rendered output. Sure enough, the quotes were embedded directly in the alt text which would break HTML validation:


If you look, you can see the alt text reading alt="Exhibit A: "VES2 Bassdrum 001" WAV" which is obviously an error. Can we fix this to escape quotes in the alt text?

For reference, the quote character (") is U+0022 (QUOTATION MARK), which is escapable with ", ", or the simple ".

closed as off-topic by Adam Lear Jun 19 '13 at 18:34

  • This question does not appear to be about the software that powers the Stack Exchange network within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 4
    This question appears to be off-topic because it is not about anything related to the Stack Exchange network, but rather confusion about a browser's code inspector tool. – animuson Jun 19 '13 at 2:31
  • 2
    @animuson This question is asking about HTML renderings of StackExchange's markdown. – Aza Jun 19 '13 at 3:47
  • @KnightswhosayNi: No it's not; not at all. Please see the answer which explains that this is not even an issue at all. – animuson Jun 19 '13 at 3:49
  • 1
    I'm pretty sure they were asking about the HTML rendering of Markdown, even though the answer pertains only to their web inspector, but that could just be me. – Aza Jun 19 '13 at 3:50
  • @KnightswhosayNi: They're claiming something on the SE network is a bug based on something that's not related to the SE network at all. In the previous system, you'd know it as "too localized." – animuson Jun 19 '13 at 3:52
  • 1
    Hrm... I guess I'm getting confused by "off topic" being the catch all for the edge case questions. Makes sense, though. – Aza Jun 19 '13 at 3:53
  • @KnightswhosayNi you are correct. – Cole Johnson Jun 19 '13 at 5:51
  • 1
    @animuson How was I supposed to know Chrome's inspector did that? That's what this question was about. I thought that the markdown renderer wasn't escaping quotes. Hence the bug tag... – Cole Johnson Jun 19 '13 at 5:53
  • @ColeJohnson: That doesn't make it on-topic for Meta. The underlying issue has absolutely nothing to do with Stack Exchange, and it caused you to report a bug that doesn't actually exist. Meta is not the place to learn how to use your developer tools. – animuson Jun 19 '13 at 5:54
  • This question appears to be off-topic because even though it is about an issue reproduced using an SE site, the core problem isn't our fault. – Adam Lear Jun 19 '13 at 18:34

The web inspector is misleading you. It displays the non-encoded value there so that it's more friendly to edit in-place. If you viewed the source of that page after saving, or checked the value of innerHTML on the parent element, you should see that it actually is escaped.

Take a look at the source of the image below in this post for an example.

I have a "quote" in here

Good thing, too, otherwise this would be an XSS vulnerability.

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