Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Custom URI schemes are sanitised with rel=nofollow #6517

Open
darthoctopus opened this issue Aug 23, 2022 · 3 comments
Open

Custom URI schemes are sanitised with rel=nofollow #6517

darthoctopus opened this issue Aug 23, 2022 · 3 comments
Labels

Comments

@darthoctopus
Copy link

darthoctopus commented Aug 23, 2022

Describe the bug

I am trying to replace my current markdown-oriented note-taking workflow with inline markdown cells in Jupyter notebooks. Part of this workflow involves links to PDF files in Zotero, which are effected with a custom URI protocol. For example, the following link: [Ahlborn+ (2020)](zotero://open-pdf/0_VCI8KREJ/3) opens page 3 of a specific document in Zotero.

However, the above markdown snippet gets turned into an empty <a> element with no href attribute and with rel="nofollow" set. I imagine this is because of overly aggressive sanitisation of the generated HTML. Is there any way to tune this?

I understand that this is related to a similar issue with JupyterLab: jupyterlab/jupyterlab#7384

To Reproduce
Steps to reproduce the behavior:

Render [Ahlborn+ (2020)](zotero://open-pdf/0_VCI8KREJ/3) in a Markdown cell

Expected behavior
A link with the custom URI scheme appears

Desktop (please complete the following information):

  • OS: Linux
  • Browser: Firefox
  • Version: 100
@jupyterlab-probot jupyterlab-probot bot added the status:Needs Triage Applied to issues that need triage label Aug 23, 2022
@RRosio
Copy link
Collaborator

RRosio commented Aug 25, 2022

Hi @darthoctopus since Notebook 6 uses the Jupyterlab sanitizer, a fix in Jupyterlab as suggested here jupyterlab/jupyterlab#7384 (comment) would solve this issue for Notebook as well.

@kostyafarber
Copy link
Contributor

kostyafarber commented Nov 15, 2022

Fix implemented here jupyterlab/jupyterlab#13341 @RRosio

@darthoctopus
Copy link
Author

darthoctopus commented Feb 4, 2023

given that I don't use jupyterlab, is there any way I can set these configuration options in nbconfig/notebook.json, for example? if not, then that isn't really a fix for this notebook issue…

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants