I got a terrible error where the html tag produced by _mailchimp_interest_groups_element function especially in the foreach ((array)$group['groups'] as $item) code result.

The symptom is :
1. user is anonymous user
2. the $item['name'] data has html tags

The result is :
1. Drupal form api failed to build the form array because the #options is an html tag without sanitizing
2. the html structure of the block is messed up thus displaying bunch of html tag as display output

So is there any way we can sanitize the $item['name'] before it get processed to drupal form API?

Thanks in advance

Comments

bleedev’s picture

Component: Code » General
Status: Active » Closed (won't fix)

The module does not support HTML in list names. The Mailchimp API uses the list names as the key to update list information. This causes an architectural change to be made to allow for HTML in list names.