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?

  • 2
    &amp; versus & is chrome being strict about the standard. If their is a single versus double quote issue, I'd file a bug with chrome. Commented Aug 18, 2011 at 16:19
  • What version of Chrome? Didn't see this issue in 13-stable or 15-dev.
    – Boris Smus
    Commented Aug 18, 2011 at 19:19
  • Chrome Version: 13.0.782.112
    – Rodrigo
    Commented Aug 18, 2011 at 19:28
  • 2
    @Rodrigo : If you find an answer to your questions then post them yourself, you can accept your own answer, otherwise it will look like you are someone who never accepts answers and people will not want to post answers to you. PS : You have the right not to accept in incorrect or invalid answer
    – jimjim
    Commented Aug 19, 2011 at 8:35
  • Works correctly in Chrome 15.0.874 beta channel.
    – Mufasa
    Commented Oct 3, 2011 at 15:36

2 Answers 2


Double, use it everywhere, thats the HTML Standard.

However, both work on almost every browser. Some browsers you can even use nothing, like width=1


I think you should modify your filters to accept the & sign in a src url.

The main problem for me is your filter part, i can't imagine the huge list of problems you may run into if you filter out valid urls.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.