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

WIP: Closes #21: Safer fields (escaping fields in xhtm) #22

Merged
merged 1 commit into from
Mar 9, 2023

Conversation

aral
Copy link
Contributor

@aral aral commented Mar 7, 2023

Escapes fields (interpolated strings)

See #21 for a more detailed explanation of the reasoning behind it.

@aral aral changed the title Closes #21: Safer fields (escaping fields in xhtm) WIP: Closes #21: Safer fields (escaping fields in xhtm) Mar 7, 2023
@aral
Copy link
Contributor Author

aral commented Mar 7, 2023

I’m testing this in Kitten at the moment and I’m not entirely sure I’m going to go with it. Will update this thread with the implications I find for authoring, etc. Please treat this PR as a work-in-progress for the time being.

@aral
Copy link
Contributor Author

aral commented Mar 7, 2023

Right, so the problem with this is that I can’t see any way of not escaping text content (e.g., for those times when we actually want to render sanitised HTML).

With vhtml, you can have dangerouslySetInnerHTML as an attribute as it’s aware of attributes. But, unless I’m missing something, we’re not at the stage where we set the field content. Sending some sort of a flag within the field content itself, of course, wouldn’t work as that would be exploit itself.

Hmm…

@dy dy merged commit 2430ce6 into dy:master Mar 9, 2023
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