Double vs Single Quotes in Chrome

Posted by Rodrigo on Pro Webmasters See other posts from Pro Webmasters or by Rodrigo
Published on 2011-08-18T16:16:42Z Indexed on 2011/11/28 2:04 UTC
Read the original article Hit count: 307

Filed under:
|
|

So when you want to embed google docs on a site you are given this chunk of code:

<iframe width='500' height='300' frameborder='0' src='https://docs.google.com/spreadsheet/pub?hl=en_US&hl=en_US&key=0AiV6Vq32hBZIdHZRN3EwWERLZHVUT25ST01LTGxubWc&output=html&widget=true'></iframe>

This works fine on my site. If you edit the page, we run the new content through some filters to escape out stuff and make sure it is valid html. After the process, the link above gets converted to this:

<iframe frameborder="0" height="300" src="https://docs.google.com/spreadsheet/pub?hl=en_US&amp;hl=en_US&amp;key=0AiV6Vq32hBZIdHZRN3EwWERLZHVUT25ST01LTGxubWc&amp;output=html&amp;widget=true" width="500"></iframe>

This will work on every browser except for chrome. Chrome thinks I am running JS in the src. I narrowed it down to a combination of double quotes and escaped '&' symbols. If i revert one of those back to the original state, the iframe works.

I work in ruby where ' and " have different behaviors. Is Chrome doing the same thing? Is there a way to turn that off?

© Pro Webmasters or respective owner

Related posts about html

Related posts about google-chrome