To check whether JavaScript works in an HTML2WEB share link, do not reduce the
answer to “yes” or “no.” Separate the document context from the resources it
needs. The current viewer runs inline HTML in an opaque origin with
sandbox="allow-scripts"; it is not ordinary hosting that shares your app’s
cookies or external network.
The link is a short-lived review preview. It does not replace an application that needs login, payments, live APIs, or a permanent URL.
The current HTML viewer boundary
| Item | Raw HTML preview | What to check |
|---|---|---|
Inline <style> |
Included in the execution path | Verify the intended layout and styles |
Inline <script> |
Included in the execution path | Test DOM interaction with synthetic data |
External <script> and CSS |
Do not assume they are allowed | Put required code in the single file or move to a real app |
fetch, XHR, and WebSocket |
Network connection is blocked | CORS settings alone cannot change the viewer policy |
| External fonts | Do not assume they are allowed | Use system fonts or inline assets |
| External images | Do not rely on them for raw HTML | Use small data: images or inline SVG when appropriate |
<iframe> |
Frame embedding is outside the boundary | Do not make an external embed a core feature |
<form> submission |
External submission is outside the boundary | Show the UI for review; process real submissions in an app |
HTML2WEB uses allow-scripts without allow-same-origin and applies an
additional CSP sandbox to the content response. As MDN’s iframe sandbox
reference
explains, a sandbox separates permissions; it does not recreate the execution
environment of an external service.
Start with an inline behaviour fixture
Do not paste an API key or customer data into a test. Start with a small, synthetic fixture:
<button id="toggle" type="button">Toggle state</button>
<p id="state">Waiting</p>
<script>
document.querySelector('#toggle').addEventListener('click', () => {
document.querySelector('#state').textContent = 'Interaction works';
});
</script>
Publish this file first and verify the DOM change and style. Then add one item at a time and record the first step that differs from your expectation:
- An inline SVG or
data:image - An external image and web font
- An external script and a
fetchrequest - An iframe and a form action
Adding several dependencies at once hides the cause of a failure. The raw HTML
viewer runs with a connect-src 'none' boundary, so reading MDN’s CORS
guide does not
remove the viewer’s network restriction.
What we re-checked in the live preview (7 October 2026)
On 7 October 2026 we opened the production /en/html-to-url tool and published a synthetic test sample, with no accounts, keys, or personal data, as a free 1-hour preview.
We then switched that same share to Markdown version 2. The manage screen showed a Saved confirmation, and the page itself rendered a heading, bold text, and two list items correctly. We also typed in a <script>document.body.textContent = "SCRIPT RAN";</script> tag, which is written to replace the whole page with the words SCRIPT RAN. On the published page, that tag showed up as plain, non-running text instead; the document kept its original content.
Finally, we used Delete permanently. The manage screen showed a confirmation that the link was deleted, and the public URL then returned an HTTP 410 (Gone) response. We did not wait out the separate 1-hour preview expiry to compare it with this deletion.
The checks below are limited to this one browser session and this one test sample; they do not confirm every browser or every external asset type.
| Observed | Check | Limit |
|---|---|---|
Inline <style> and inline SVG rendered in the raw-HTML version |
Visual check only | Not tested across browsers |
| “Toggle state” button changed the on-page text from Waiting to Interaction works | Click the button yourself to reproduce | Confirms DOM interaction, not a production feature |
| “Check network boundary” button changed the text from Not tested to Network request blocked | Click the button yourself to reproduce | A fetch to the service’s own /health endpoint did not complete |
The preview <iframe> carries sandbox="allow-scripts" with no allow-same-origin |
Confirmed by inspecting the DOM | Scope of this one page, not a general CSP finding |
A pasted <script> tag stayed as plain text in the Markdown version instead of running |
Visual check of the rendered page | Markdown and raw HTML still follow different rules for what can run |
The original tested share link is gone now (HTTP 410 after deletion), so it cannot be reopened to reproduce these results. To try the interaction and network checks from that test sample yourself, publish a new free preview with this code, which contains the two buttons, their result text, and the network check handler:
<button id="toggle">Toggle state</button><p id="state">Waiting</p><button id="network">Check network boundary</button><p id="network-state">Not tested</p><script>document.querySelector('#toggle').addEventListener('click',()=>document.querySelector('#state').textContent='Interaction works');document.querySelector('#network').addEventListener('click',async()=>{try{await fetch('https://html2web.iill.dev/health');document.querySelector('#network-state').textContent='Request completed'}catch{document.querySelector('#network-state').textContent='Network request blocked'}});</script>
This snippet omits the inline <style> and inline SVG used in our original screenshot; add your own styling if you want to check that part too. Click each button once and the on-page text should change the same way.

Synthetic test sample, published and later deleted during this QA pass, checked 7 Oct 2026.
For the rules behind these results, see the HTML source security checklist.
Markdown and HTML do not use the same resource policy
HTML2WEB renders Markdown into static HTML. Current tests allow HTTPS, data:,
and blob: images in Markdown, while raw HTML follows a narrower inline-asset
policy. Do not infer that an external image which works in Markdown will also
work in raw HTML. Record the content type and the exact resource URL together.
Move to a real app when you need these capabilities
- Login, cookies, or user-specific permissions
- A server API, live data, or a WebSocket connection
- Real payment, booking, or enquiry storage
- Several external scripts, fonts, maps, or chart modules as dependencies
- A permanent, searchable URL after review
For those cases, compare the lifetime and operating responsibility in the HTML sharing, conversion, and deployment guide, then use HTML2WEB as a review link before approval rather than as production hosting.
Compatibility checklist before sharing
- I tested inline style and script with a synthetic fixture first.
- I checked external images, fonts, scripts, and APIs one at a time.
- I understand that
connect-src 'none'remains even when a remote server has CORS headers. - I did not describe iframe, form, login, or cookie behaviour as a production capability.
- I separated raw HTML and Markdown resource policies.
- The shared copy contains no API key, personal data, or internal URL.
- I confirmed the actual expiry time and chose durable hosting for ongoing operation.
Before publishing, use the HTML source security checklist and the share-link protection guide to separate source safety from passwords, expiry, and noindex. The HTML to URL tool is designed to create a reviewable temporary URL while making this boundary explicit.
