Commit graph

14 commits

Author SHA1 Message Date
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
HaoLiHaiO 4387dea116 fix typo 2021-08-27 19:52:57 +03:00
Henning Dieterichs 4f0939431c
Adds files to .eslintignore that are not linted by "yarn eslint" to ensure no CI errors => no editor errors. 2021-07-21 09:30:04 +02:00
Henning Dieterichs 2a0c4cc1c3
Uses eslint-plugin-header to enforce license headers. Features quick fix to add license header. 2021-07-09 18:20:17 +02:00
Matt Bierner 35f855796b
Add support for markdown notebook renderers (#115191)
* Use shared webpack version instead of installing locally for simple-browser

* Use npm for building markdown preview

* render markdown in webview.

* update markdown preview height and offset

* Add basic custom notebook renderer point

* update css

* style update.

* update markdown header padding left

* Add example of loading katex to extend the markdown-it renderer

* Rename global to make clear it only applies to markdown-in

* hide/remove markdown preview

* Add wait for initial markdown preview rendering before showing notebook

* Add double click to switch to editing mode

* Fix markdown cells not getting updated after editing

* style polish

* notebook.experimental.useMarkdownRenderer

* switch render strategy.

* Adding very intial drag drop support for notebook markdown cells

* Implement drag/drop stubs for test classes

* Revert unrelated file changes

* Move markdown notebook math to own extension

* Add missing imports

Co-authored-by: rebornix <penn.lv@gmail.com>
2021-02-10 16:41:53 -08:00
Matt Bierner 04ec120e2c Exclude dist from eslint and hygine
These files come from the web builds
2020-12-09 18:45:54 -08:00
Matt Bierner 71fad5aa41 Enable preferConst in TS project 2020-12-09 18:19:14 -08:00
Sandeep Somavarapu 88144f6d31 Fix #80698
- Inline semver
2020-10-26 12:12:07 +01:00
Johannes Rieken 02f23e5680 remove polyfill promise 2020-03-02 15:30:43 +01:00
Johannes Rieken 2bd15957aa tweak ignore file 2019-12-31 10:39:33 +01:00
Johannes Rieken 54d20309fa tweak rules and excludes 2019-12-30 10:51:58 +01:00
Johannes Rieken a1047421ff use single eslintrc-file for extensions/ and src/, no type check rules 2019-12-24 16:11:51 +01:00
Johannes Rieken 31d049f329 use (most of) generated eslintrc-file 2019-12-24 13:51:11 +01:00
Johannes Rieken 556475c71f add eslint-rules "module" and use it in eslintrc-file 2019-12-24 13:07:59 +01:00