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
IPython.display HTML is overwriting the target attribute in hyperlinks #6827
Comments
Hi @michaele4321, the adding of That said, I think it is reasonable for us to not override the jupyterlab/packages/rendermime/src/renderers.ts Lines 600 to 605 in 079115d
One would then not override the target attribute if it was already specified.
|
Hi @ian-r-rose, thanks for looking at this. The context is that I am generating an HTML table of data with each row linked to an external page. I want to use a named target so that each link opens in the same external page (in my case on a second screen) rather than opening multiple new tabs. |
Interesting, thanks for sharing @michaele4321! |
I'd like to take this issue up. |
Great, thanks @kavishdahekar! |
Unable to add reviewers for PR #7215 . |
Describe the bug
When using iPython.Display HTML in Jupyter Lab code, the target attribute in hyperlinks is being overwritten with "_self" or"_blank"
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The link should be
Desktop (please complete the following information):
Additional context
I'm not familiar enough with the Jupyter Lab code architecture to debug this but there is code in packages/rendermime/src/renderers.ts which looks like it might cause this problem.
The HTML spec specifies that target allows values that are valid browsing context names or keywords which in practice means _blank, _self, _parent, _top, or anything else that does not start with a _.
The text was updated successfully, but these errors were encountered: