Skip to content
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

Non-http URL schemes in Markdown cells #189

Open
damiendr opened this issue Jul 8, 2015 · 4 comments
Open

Non-http URL schemes in Markdown cells #189

damiendr opened this issue Jul 8, 2015 · 4 comments

Comments

@damiendr
Copy link

damiendr commented Jul 8, 2015

I use URLs like these to link to scientific papers in my Papers2 library:
papers2://publication/citekey/Polsky:2004jc

In the notebook, the following results in a clickable URL:

%%HTML
<a href="papers2://publication/citekey/Polsky:2004jc">Polsky:2014jc</a>

But in a Markdown cell, this doesn't work (link is underlined but nothing happens when clicked):

[Polsky:2004jc](papers2://publication/citekey/Polsky:2004jc)

Indeed the page source shows it was rendered as <a>Polsky:2004jc</a>. Changing the scheme to http causes a href attribute to appear (not fit for the original purpose obviously).

I tested it in the current version of marked and the link renders properly. Is that a security setting? The notebook is trusted.

@minrk minrk added the bug label Sep 10, 2015
@minrk minrk added this to the 5.0 milestone Sep 10, 2015
@minrk
Copy link
Member

minrk commented Sep 10, 2015

This is likely due to the sanitization by caja. We should investigate whether it is doing protocol whitelisting, and if we can disable it.

@minrk minrk modified the milestones: Backlog, 5.0 Jan 13, 2017
@JamiesHQ
Copy link
Member

@minrk : hi there- do you have any updates on this bug report? Does the bug still exist or can this issue be closed? Thanks!

@mpacer
Copy link
Member

mpacer commented Apr 25, 2017

How is the current attachment: protocol being handled? Is that a fundamentally different problem since it's related to mimetypes?

@gnestor
Copy link
Contributor

gnestor commented Dec 7, 2017

Would it compromise notebook security to allow a elements with any href value? If not, simply adding a ATTRIBS['a::href'] = 0; after this line will do the trick...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment