I'd like to be able to pass in pre-rendered HTML that I've already prepared in a preprocess function.

In bef_checkbox(), the label text is currently being run through check_plain(). Is there any reason we shouldn't use filter_xss_admin() instead?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Les Lim’s picture

Status: Active » Needs review
FileSize
566 bytes

Patch attached. I think this would also resolve #1187190: HTML special characters get escaped twice.

mikeker’s picture

Status: Needs review » Fixed

Seems fair. Committed.

Status: Fixed » Closed (fixed)

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

cmonnow’s picture

Issue summary: View changes
Status: Closed (fixed) » Active

Sorry for reopening this issue. Is there a reason filter_xss_admin() was reverted back to check_plain()?

OK, it turns out it's my fault. The recent patch I suggested for theming checkboxes (https://www.drupal.org/node/1404656) was copy-pasted from an old patch. Need to make this change again (and check if I've reintroduced old issues elsewhere).

cmonnow’s picture

Les Lim’s picture

Status: Active » Closed (fixed)

Reverting status.