Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question

migrated from stackoverflow.com Aug 19 '11 at 4:00

This question came from our site for professional and enthusiast programmers.

&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. – Justin Dearing Aug 18 '11 at 16:19
I will accept answers if they are correct or fixed my issue, I'm not going accept in incorrect or invalid answer. – Rodrigo Aug 18 '11 at 18:56
What version of Chrome? Didn't see this issue in 13-stable or 15-dev. – Boris Smus Aug 18 '11 at 19:19
Chrome Version: 13.0.782.112 – Rodrigo Aug 18 '11 at 19:28
@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 – Arjang Aug 19 '11 at 8:35

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

share|improve this answer
Might not work in older browsers though. Always, absolutely always use double. – Zenklys Jan 10 '12 at 14:42

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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