-
Notifications
You must be signed in to change notification settings - Fork 11
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
Document safety of handling user input (like JSX escaping) #10
Comments
yes it does - all inputs run through here https://github.com/esxjs/esx/blob/master/lib/escape.js |
would love a PR for this if you're into it |
I suggest also mentioning in the docs that it uses custom escaping code, rather than the official React escaping code (just for transparency). |
no it's supposed to match the escape codes in React, that's why it's duplicated rather than just using are you saying it doesn't? if so that should be fixed |
I just meant that the docs should mention how |
yes I see what you're saying. It corresponds exactly right now. It's terribly annoying that react didn't just use the escape-html module or release their own. Would you be interested in making a PR? |
I suggest filing an issue asking them to make it importable so you can at least call the same function.
I can add it to my to-do list but I probably won't get to it any time soon. |
JSX provides automatic escaping which lets you put user input into JSX safely (and without thinking about it).
Does
esx
provide this under the hood? I was unsure when looking through the ES6 template string examples so it would be helpful to document this in the readme.The text was updated successfully, but these errors were encountered: