Skip to content
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

Error: Visual editing breaks image previews #7415

Open
fgnass opened this issue Feb 25, 2025 · 0 comments
Open

Error: Visual editing breaks image previews #7415

fgnass opened this issue Feb 25, 2025 · 0 comments
Labels
type: bug code to address defects in shipped code

Comments

@fgnass
Copy link
Contributor

fgnass commented Feb 25, 2025

Describe the bug

Currently, when visualEditing is enabled, all strings get stega-encoded in the preview. This breaks the image preview as lots of invisible characters get appended to the URL.

Possible fixes

Ideally, each widget could decide if and how its values should be encoded. Since we currently have no access to the widget, we could check the field type string and restrict the encoding to well-known core widgets (string/text/markdown) and allow string widgets to opt out on a per-field basis.

What's next?

I'll submit a PR with a simple fix.

@fgnass fgnass added the type: bug code to address defects in shipped code label Feb 25, 2025
fgnass added a commit to fgnass/decap-cms that referenced this issue Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug code to address defects in shipped code
Projects
None yet
Development

No branches or pull requests

1 participant