News for hackers. Stuff that matters.
Re:CSS in GitHub Readmes by firloop on Tuesday December 08, 2020 @04:56PM (#25351921)
I imagine the hard part of securing <iframe /> tags isn't the sandbox, but instead maintaining user privacy. GitHub caches and proxies all of the images they render. One of the benefits of this is that a 3rd party can't fingerprint or otherwise log information about the requester. Seems a lot harder to get that right in the <iframe /> case.
Re:CSS in GitHub Readmes by cj on Tuesday December 08, 2020 @06:20PM (#25352945)
It's technically possible to have an iframe with no "src" (not loading from a 3rd party) but still embed html/css inside the frame for sandboxing purposes.

I believe the sandbox attribute would also block javascript / scripts, although not sure what cross browser support on that looks like.

Re:CSS in GitHub Readmes by felixfbecker on Tuesday December 08, 2020 @07:02PM (#25353429)
You can still cache an SVG embedded through <iframe> the same way you cache an SVG embedded through <img>. It's just an HTTP exchange. The sandbox attribute and a CSP can make sure no external content is loaded inside the SVG either (not even external images, fonts etc).