#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 04/01/26, 09:00
-
Josua Vogel commented 04/01/26, 09:12
-
Nicklas Tölke commented 04/01/26, 09:20
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 04/01/26, 10:23 -
Gerrit Code Review pushed patch set 2 for main to change 93509 04/01/26, 16:14
-
Josua Vogel commented and changed status
Under ReviewResolved done0 %100 % 04/02/26, 06:05Applied in changeset commit:1feed0cb0ef033e9bb478ba1c0a2080a87b324d8.
-
Benni Mack changed status
ResolvedClosed 04/21/26, 11:30
Hi @nicklas.toelke,
Thank you very much for the bug report. I’ll look into the issue and try to find a solution. ;)