datapane / datapane

Build and share data reports in 100% Python

Home Page:https://datapane.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Linking out to external resources in dp.HTML()

ArtemSokolov opened this issue · comments

Dear Datapane developers,

The documentation notes that

The HTML block is sandboxed and cannot execute JavaScript.

However, this seems to prevent reports from linking out to external pages in dp.HTML(). For example,

html = '<a target="_blank" href="https://datapane.com/">Created in the awesome Datapane</a>'
dp.App(dp.HTML(html)).save('test.html')

generates a page where the link does not appear to be clickable. Is there a way to get the desired behavior from dp.HTML()?

Hey @ArtemSokolov, that should work, pinging @Buroni who is more familiar with the HTML block implementation in the browser.

Just to note that we are modifying the security policies shortly that should allow more extensive JS within the HTML block going forwards.

Hey @ArtemSokolov we use sandboxed iframes which block the iframe document from navigating away. I'll look into allowing link navigation and get back to you on this in the next few days.

Thanks, @Buroni. No rush. Our current workaround has been to right-click -> open in a new tab.