: Double vs Single Quotes in Chrome 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
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&hl=en_US&key=0AiV6Vq32hBZIdHZRN3EwWERLZHVUT25ST01LTGxubWc&output=html&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?
More posts by @LarsenBagley505
2 Comments
Sorted by latest first Latest Oldest Best
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.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.