hackmdio / hackmdio/hackmd-io-issues
Book mode: Assume target=_blank when frame-ancestors keeps the content from loading
- Lingua principale
- Nessun dato sulla lingua
- Stelle
- 40
- Fork
- 9
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
I've created [a demo book](https://hackmd.io/@patcon/H1p_i2jkS) demonstrating the issue with links to websites like GitHub. GitHub uses the CSP `frame-ancestors 'none'` ([docs](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/frame-ancestors)), which prevents the browser from showing it. This results in a blank page and this error in console:
> Refused to display 'https://github.com/hyphacoop/organizing/blob/master/2019-06-05-all-hands-meeting.md' in a frame because an ancestor violates the following Content Security Policy directive: "frame-ancestors 'none'".
Feeling like maybe it's possible to detect this and open in a new tab. I understand that it might NOT be possible to show the proper "new tab" icon with this method, but perhaps an open source repo with a whitelist of domains could allows users to keep a manual list up-to-date, which HackMD could use to know the CSP in advance. Also, the whitelist could just be a list of test urls/domains, and a script could run nightly to determine the policy on its pages.
Anyhow, thanks for the tool, and any consideration! 🙌
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Inizia dal libro demo collegato e riproduci la pagina incorporata vuota usando l’URL GitHub e la relativa policy frame-ancestors. L’issue non indica file sorgente né test, quindi individua innanzitutto i punti di ingresso per il rendering dei link e l’incorporamento in modalità libro. Il lavoro sarà completato quando sarà stato concordato un comportamento per le pagine bloccate incorporate in un frame e sarà stato verificato che i link interessati non lascino più una pagina vuota.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Ambito
- frontend
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 25/100