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
Fix issues with escapings with forms #456
base: development
Are you sure you want to change the base?
Fix issues with escapings with forms #456
Conversation
82454ee
to
0cf17db
Compare
Fixed conflicts caused by #454 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So after this change when should one use the simple text field? Why don't we delete the simple text field and use only the textarea?
As I understand, currently our I was planning on making a simple bugfix, and did not check whether some other components are necessary (like I just now realized that I just removed the feature that can repopulate the forms in case of validation errors. I will check on that as well. |
Yeah these input fields can be cumbersome to use. The main reason I added those to insert the validation messages automatically as those were easy to miss out (and to avoid writing some trivial tags). I'm open to other solutions here. When working with input fields we need to keep the followings in mind:
I'm still sure we don't have all these everywhere yet as there are a lot of special cases. |
There have been multiple issues with characters being escaped incorrectly. Check #28
It's better and easier to use textareas if someone needs to show previous user input since it is much more established how one can escape HTML as simple text on the page in PHP / Laravel compared to escaping inside of an attribute.
x-input.textarea
has been also reworked to have a similar interface tox-input.text
and also to use slots instead of attributes to show values input by the user (https://laravel.com/docs/10.x/blade#slots).This PR should fix #28.