Problem/Motivation

When using the latest release of bootstrap in combination with latest d8 core, markup in form element labels won't get rendered but escaped due to usage of Xss::filterAdmin() in bootstrap_preprocess_form_element_label().

This might also be the case in other locations of the bootstrap theme code, but i didn't investigate further for now.

You can however reproduce the issue by changing any checkbox label to contain a link and view that form in a bootstrap based theme.

Proposed resolution

Remove usage of Xss::filterAdmin() as core already handles this correctly. Also check for other locations that use escaping, test and remove escaping if possible.

CommentFileSizeAuthor
#2 checkbox-label-escaped-2581141-2.patch689 bytess_leu

Comments

s_leu created an issue. See original summary.

s_leu’s picture

Status: Active » Needs review
StatusFileSize
new689 bytes

Here a patch that fixes the behavior with markup in form element titles. This is just a start, other locations of the bootstrap code need to be checked and probably fixed as well.

neardark’s picture

Status: Needs review » Fixed

Merged.

  • s_leu authored bb4110f on 8.x-3.x
    Issue #2581141 by s_leu: Checkbox label gets escaped with latest core
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.