-
-
Notifications
You must be signed in to change notification settings - Fork 549
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
Minify field HTML is too aggressive #6390
Comments
This PR adds a space between checkbox input and checkbox/radio label text though, which was intentionally minified to allow the user to control that gap via margin CSS. For example: <label><input type="checkbox"> Option with <a href='/link'>a link</a> to click</label> Thinking it should be: <label><input type="checkbox">Option with <a href='/link'>a link</a> to click</label> |
@jesseleite How should the regex know about this space, though? Would this not be a matter of updating the default checkboxes field Antlers template? |
No we shouldn't have to modify the templating. See #6394, which addresses both of our concerns. Thank you again for taking the time to PR! |
Bug description
We’re using HTML inside a checkbox option value. Spaces after tags are removed. This causes words to stick together.
Rendered:
Note the missing space between “Datenschutzbestimmungen” and “und”.
The problem is caused by the regex in
RendersForms::minifyFieldHtml()
, introduced in #4949 (9ba5e2d).How to reproduce
Prepare a form with a checkbox:
Render the form and see the minified result (see above).
Logs
No response
Environment
Installation
Fresh statamic/statamic site via CLI
Antlers Parser
No response
Additional details
No response
The text was updated successfully, but these errors were encountered: