hub-client: `<script>` and hover handlers in `{=html}` blocks don't run in the preview

Open
#985 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
html, rust
Domain
frontend, security

Research direction

Start by tracing how the hub-client renders {=html} blocks in the preview and how that path handles scripts and event handlers. Check the raw HTML safety work in #167 and the related approach in #986 before choosing a direction. Done means either scripts and hover handlers work safely in previews or a supported sandboxed way to embed interactive prototypes is available.

Written by the indexing model from the issue text.

Description

Summary

In the preview, <script> tags and hover handlers inside a {=html} block don't run. Only inline onclick handlers work.

Request

Let scripts in raw HTML blocks run in the preview, or, if that isn't safe, offer a supported way to embed an interactive prototype (for example a sandboxed iframe).

Impact

I write design docs that compare small UI prototypes, such as two variants of a picker. Reviewers need to hover and click through them to give useful feedback. Without scripts, I'm limited to static screenshots, and the most useful part of the review happens outside the doc.

Related
  • #43 (raw HTML safety, subsumed by #167)
  • #986 (serving project HTML files, another way to share a prototype)
Dominant language
Rust
Stars
302
Forks
22
Avg merge
5h 2m
Merged PRs (30d)
213

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from quarto-dev/q2

All issues in quarto-dev/q2

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.