Iframe src html content

This chrome example extension:
in feed.html creates html to assign to src attribute of iframe:

 desc.src="data:text/html," + iframe\_src + itemDesc + "";  

But if You try this there is problem with encoding within IFRAME, at least for everything else than ASCII...

To sole this I recommend reading:
Especially: http://www.ietf.org/rfc/rfc2397.txt

Finally, fix looks like this:

desc.src="data:text/html;**charset=\\"UTF-8\\"**," + iframe\_src + itemDesc + "";

Share on Hacker News
Share on LinkedIn

← Home

Want to learn more?

Sign up to get a digest of my articles and interesting links via email every month.

* indicates required

Please select all the ways you would like to hear from Krzysztof Kula:

You can unsubscribe at any time by clicking the link in the footer of my emails.

I use Mailchimp as a marketing platform. By clicking below to subscribe, you acknowledge that your information will be transferred to Mailchimp for processing. Learn more about Mailchimp's privacy practices here.