Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@
<!-- JavaScript Library to Convert Markdown into HTML -->
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>

<!-- DOMPurify to sanitize HTML output -->
<script src="https://cdn.jsdelivr.net/npm/dompurify/dist/purify.min.js"></script>

<!-- Marked plugin to add heading ID's -->
<script src="https://cdn.jsdelivr.net/npm/marked-gfm-heading-id/lib/index.umd.js"></script>

Expand All @@ -53,7 +56,7 @@
fetch( 'https://raw.githubusercontent.com/offa/android-foss/master/README.md' )
.then( response => response.text() )
.then( data => {
document.querySelector( 'main' ).innerHTML = marked.parse( data );
document.querySelector( 'main' ).innerHTML = DOMPurify.sanitize( marked.parse( data ) );
})
.catch( error => console.error( 'Error:', error ) );

Expand Down
Loading