vscode/src/vs/base/browser
Matt Bierner 474d4951d8
Switch to dompurify for sanitizing markdown content (#131950)
* Switch to dompurify for sanitizing markdown content

Switches us from using `insane` to instead use `dompurify`, which seems to be better maintained and also has some nice features, such as built-in trusted types support

I've tried to port over our existing sanitizer settings as best as possible, but there's not always a 1:1 mapping between how insane works and how dompurify does. I'd like to get this change in early in the iteration to catch potential regressions

* Remove logging and renaming param

* Move dompurify to browser layer

* Fixing tests and how we check valid attributes

* Allow innerhtml in specific files

* Use isEqualNode instead of checking innerHTML directly

innerHTML can return different results on different browsers. Use `isEqualNode` instead

* Reapply fix for trusted types

* Enable ALLOW_UNKNOWN_PROTOCOLS

I beleive this is required since we allow links to commands and loading images over remote

* in -> of

* Fix check of protocol

* Enable two more safe tags
2021-09-03 12:17:02 -07:00
..
dompurify Switch to dompurify for sanitizing markdown content (#131950) 2021-09-03 12:17:02 -07:00
ui resolves #83638 2021-08-31 17:57:50 -07:00
browser.ts remove isIpad flag, use a more generic isIOS 2021-05-07 17:50:08 +02:00
canIUse.ts re #127822 2021-07-05 13:57:21 -07:00
contextmenu.ts Organize imports in vs/base 2021-08-04 12:28:27 -07:00
dnd.ts Get dragging from editor to splits working 2021-06-17 19:52:34 -07:00
dom.ts Switch to dompurify for sanitizing markdown content (#131950) 2021-09-03 12:17:02 -07:00
event.ts Organize imports in vs/base 2021-08-04 12:28:27 -07:00
fastDomNode.ts
formattedTextRenderer.ts Fix spelling on properties 2021-08-18 19:03:33 -07:00
globalMouseMoveMonitor.ts Organize imports in vs/base 2021-08-04 12:28:27 -07:00
hash.ts add some docs for workaround for #114227 2021-01-22 17:05:36 +01:00
history.ts
iframe.ts
keyboardEvent.ts
markdownRenderer.ts Switch to dompurify for sanitizing markdown content (#131950) 2021-09-03 12:17:02 -07:00
mouseEvent.ts
touch.ts add common.isTouchDevice 2021-08-16 16:49:06 +02:00