Skip to content
This repository has been archived by the owner on Jan 20, 2022. It is now read-only.

Sanitize markdown #49

Closed
jfrolich opened this issue Nov 21, 2018 · 1 comment · Fixed by #150
Closed

Sanitize markdown #49

jfrolich opened this issue Nov 21, 2018 · 1 comment · Fixed by #150
Labels
enhancement New feature or request

Comments

@jfrolich
Copy link
Contributor

The markdown output currently is not great where it needlessly escapes a lot of characters, for instance a . will become \.. Just putting this on the radar. When using the raw markdown somewhere else for instance when exporting, this is not great.

@tommoor
Copy link
Member

tommoor commented Nov 22, 2018

We've got an ongoing project in the serializer library to tackle this, https://github.com/tommoor/slate-md-serializer/commits/master/src/utils.js

We're definitely playing it safe right now – It's important that you could write something that looks exactly like markdown in the editor and it should be reproduced faithfully on reload. You can use an unescape method like this one on the output to clean it up:

https://github.com/outline/outline/blob/master/shared/utils/unescape.js

@tommoor tommoor added the enhancement New feature or request label Jan 16, 2019
@tommoor tommoor mentioned this issue May 6, 2020
16 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants