#109452Form checkbox labels with RTE can render invalid HTML (<p> inside <label>)
Description
Current Behavior
Since TYPO3 v14.2.0, checkbox labels in EXT:form support rich text editing.
This is useful for links like privacy-policy consent text.
However, the frontend checkbox template renders the label HTML directly inside the <label> element.
If the RTE content contains a paragraph, TYPO3 outputs <p> inside <label>, which is invalid HTML.
Expected Behavior
Checkbox labels should render valid HTML.
Either:- the
form-labelRTE processing should normalize content to inline-only markup for checkbox labels, or - the checkbox template should unwrap top-level paragraphs before rendering inside
<label>.
Actual Behavior
Rendered markup can become:
<label for="..."><p>I agree to the <a href="/privacy">privacy policy</a>.</p></label>Reviews 1
History 57
-
Josua Vogel changed assigned to Josua Vogel <span data-processor="relativetime" data-value="2026-04-01T09:00:06+00:00" > 04/01/26, 09:00 </span>
-
Nicklas Tölke commented <span data-processor="relativetime" data-value="2026-04-01T09:20:59+00:00" > 04/01/26, 09:20 </span>
Thanks for the quick response, @josuavogel :)
Let me know if I can provide any additional details. -
Gerrit Code Review pushed patch set 1 for main to change 93509 status
NewUnder Review <span data-processor="relativetime" data-value="2026-04-01T10:23:05+00:00" > 04/01/26, 10:23 </span> -
Gerrit Code Review pushed patch set 2 for main to change 93509 <span data-processor="relativetime" data-value="2026-04-01T16:14:11+00:00" > 04/01/26, 16:14 </span>
-
Josua Vogel commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2026-04-02T06:05:09+00:00" > 04/02/26, 06:05 </span>Applied in changeset commit:1feed0cb0ef033e9bb478ba1c0a2080a87b324d8.
-
Benni Mack changed status
ResolvedClosed <span data-processor="relativetime" data-value="2026-04-21T11:30:32+00:00" > 04/21/26, 11:30 </span>
Hi @nicklas.toelke,
Thank you very much for the bug report. I’ll look into the issue and try to find a solution. ;)