mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 20:26:08 +00:00
fix 235221: Passing the markdown content to the webview via meta tag and purifying it before use
This commit is contained in:
@@ -353,6 +353,12 @@ document.addEventListener('click', event => {
|
||||
}
|
||||
}, true);
|
||||
|
||||
window.addEventListener('load', () => {
|
||||
const htmlParser = new DOMParser();
|
||||
const markDownHtml = htmlParser.parseFromString(getData('data-md-content'), 'text/html');
|
||||
document.body.appendChild(markDownHtml.body);
|
||||
});
|
||||
|
||||
window.addEventListener('scroll', throttle(() => {
|
||||
updateScrollProgress();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user