-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Images with space in the URI don't get parsed #1369
Comments
Looks like it is acting the way it is supposed to. according to the Common Mark Spec:
|
The workaround is to use url encoding like so Notice that the space character is encoded as Update: I missed your last line about sanitize. Sanitizing is about handling attacks, not fixing typos. |
I'm aware of the Common Mark Spec and the workaround but it feels within the scope of the |
As @styfle mentioned above The only way to fix your issue would be to replace the space with |
Images with spaces in the filepath are no longer being parsed correctly.
To Reproduce
Process the following doesn't see match an image.
![Example image](https://example.com/image space.png)
See Marked Demo for example
npm install --save marked@0.5.1
with the version you are usingmarked('![Example image](https://example.com/image space.png)', {sanitize: true})
Expected behavior
Expected the url to be made html friendly with the switch
sanitize
by replacing spaces with%20
.The text was updated successfully, but these errors were encountered: