mynetx
Repos
2
Followers
46
Following
8

The core Laravel CMS Composer package

2123
318

Events

Created at 1 month ago
Created at 1 month ago
issue comment
Minify field HTML is too aggressive

@jesseleite How should the regex know about this space, though? Would this not be a matter of updating the default checkboxes field Antlers template?

Created at 1 month ago

Use different regex to trim field HTML whitespace

Regex taken from https://regex101.com/r/nd2kTY/1

Created at 1 month ago
pull request opened
Use different regex to trim field HTML whitespace

Regex taken from https://regex101.com/r/nd2kTY/1

Fixes #6390

Created at 1 month ago

Update russian (#4306)

  • Update Russian translation

  • Fix an issue with spaces

  • Update translations

Support default on all applicable form inputs (#4323)

  • Support default on all applicable form inputs

  • Revert multi line formatting and fix tests

  • Fix these ones too

Enhance the group_by modifier (#4322)

Adjust isCpRoute (#4324)

Co-authored-by: Joachim Rütter jm@pixelkode.com

Update German and Swiss translations (#4311)

Improve IDE completion of GraphQL facade (#4307)

Split Modifier (#4305)

Return queries from QueriesConditions trait (#4312)

  • Return queries from QueriesConditions trait

  • StyleCI fix

  • StyleCI fix

Don't show 'toggle all' checkbox if max_items is 1 (#4309)

French translations (#4332)

Fix user binding and shallow augmenting (#4243)

changelog

Fix term entries and entry counts (#4335)

Allow to ensure multiple fields at once (#4333)

delete svg after test so it doesn't hang around

changelog

Fix parent tag regression (#4345)

Fix cascade hydration (#4359)

Update German translations (#4373)

Make pluck modifier work with arrays (#4374)

Created at 1 month ago
create branch
mynetx create branch fix/6390-minify-field-html-too-aggressive
Created at 1 month ago
create branch
mynetx create branch 3.3
Created at 1 month ago
opened issue
Minify field HTML is too aggressive

Bug description

We’re using HTML inside a checkbox option value. Spaces after tags are removed. This causes words to stick together.

Rendered:

<label for="accept_privacy[]-62e2482cd8cea" class="text-base text-current leading-tight text-left select-none">Ich akzeptiere die <a href='/datenschutz' class='underline hover:no-underline'>Datenschutzbestimmungen</a>und bin mit der Verarbeitung meiner Daten gemäß DSGVO einverstanden.

Note the missing space between “Datenschutzbestimmungen” and “und”.

The problem is caused by the regex in RendersForms::minifyFieldHtml(), introduced in #4949 (https://github.com/statamic/cms/commit/9ba5e2df349d26d06787f3ec0dc55a17e26673c7).

How to reproduce

Prepare a form with a checkbox:

      -
        handle: accept_privacy
        field:
          inline: false
          options:
            'yes': 'Ich akzeptiere die <a href=''/datenschutz'' class=''underline hover:no-underline''>Datenschutzbestimmungen</a> und bin mit der Verarbeitung meiner Daten gemäß DSGVO einverstanden.'
          display: Datenschutzbestimmungen
          type: checkboxes
          icon: checkboxes
          listable: hidden
          instructions_position: above
          validate:
            - required

Render the form and see the minified result (see above).

Logs

No response

Environment

Statamic 3.3.24 Pro
Laravel 8.83.23
PHP 8.0.21
webographen/statamic-dynamic-token 1.0.0
withcandour/aardvark-seo 2.0.28

Installation

Fresh statamic/statamic site via CLI

Antlers Parser

No response

Additional details

No response

Created at 1 month ago