Skip to content

escape prop values unless the field is HTML - #162

Merged
preaction merged 1 commit into
Yancy-app:masterfrom
uniejo:fix-content-xss
Oct 10, 2026
Merged

preaction merged 1 commit into
Yancy-app:masterfrom
uniejo:fix-content-xss

Conversation

@uniejo

@uniejo uniejo commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

The prop helper passed item values to tag as a callback, so they were output without escaping. A value like <script>...</script> in any field (for example, a user-submitted name) became script on the page.

Only output values as HTML for fields with contentMediaType: text/html, which the editor already uses for HTML fields. Everything else is escaped.

The `prop` helper passed item values to `tag` as a callback, so they
were output without escaping. A value like `<script>...</script>` in
any field (for example, a user-submitted name) became script on the
page.

Only output values as HTML for fields with `contentMediaType:
text/html`, which the editor already uses for HTML fields. Everything
else is escaped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@preaction
preaction merged commit 74bf0d2 into Yancy-app:master Oct 10, 2026
1 check failed
@preaction

Copy link
Copy Markdown
Collaborator

Thanks!

@uniejo
uniejo deleted the fix-content-xss branch October 12, 2026 08:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants