mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-25 16:55:59 +03:00
[PR #4890] [MERGED] fix: resolve issues around rendering HTML response previews #4980
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#4980
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/hoppscotch/hoppscotch/pull/4890
Author: @nivedin
Created: 3/14/2025
Status: ✅ Merged
Merged: 3/18/2025
Merged by: @jamesgeorge007
Base:
patch← Head:fix/html-preview-bug📝 Commits (4)
4593a32fix: html preview bug228bc33chore: code cleanup8d3fe9fchore: add warning for iframe sandbox issuec50cb20refactor: remove redundant state variables📊 Changes
2 files changed (+35 additions, -14 deletions)
View changed files
📝
packages/hoppscotch-common/src/components/lenses/renderers/HTMLLensRenderer.vue(+7 -2)📝
packages/hoppscotch-common/src/composables/lens-actions.ts(+28 -12)📄 Description
Closes #4862, HFE-776.
This PR fixes the issue where the html preview was not working as expected.
What's changed
The defaultPreview has been changed to a computedAsync variable since the persistenceService.getLocalConfig is an async function.
Before
After
Note to reviewers
There was already a bug where the iframe sometimes didn't load due to sandbox error

This can be fixed by allowing
allow-scripts allow-same-originin the sandbox attribute of the iframe but have some security issues that follows. This can be tackled separately if necessery🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.