StampyAI / stampy-ui

AI Safety Q&A web frontend
https://aisafety.info
MIT License
34 stars 9 forks source link

Whitelist of plain URLs to iframe #140

Closed plexish closed 1 year ago

plexish commented 1 year ago

Would be super nice to have https://aisafety.world/map iframed on the main page at least, maybe https://coda.io/@alignmentdev/alignmentecosystemdevelopment in another answer, having that list expandable might prove valuable if not too complex.

If a full plain URL from the whitelisted domains is in the markdown, it should be transformed into a large (~screen height, full answer width) iframe of that URL.

jrhender commented 1 year ago

I'm going to take a look at this as a part of the EA London Hackathon 🚀

jrhender commented 1 year ago

Here's an example:

image

In the above, https://google.com should render as an iframe of https://google.com

jrhender commented 1 year ago

Another reason for having the whitelist (as mentioned in the issue description) is that it might be good to test if sites have set X-Frame-Options such that their site can be loaded in an iframe: https://stackoverflow.com/questions/27358966/how-to-set-x-frame-options-on-iframe

jrhender commented 1 year ago

Discussing with @plexish , the "parser" tag (currently applied to this issue) may be inaccurate as it implies that the url -> iframe transformation should be done prior to the data being served to the frontend from coda. This is not ideal because the coda data is also consumed by Discord which cannot render iframes.