Image maps (http://www.w3schools.com/tags/tag_map.asp) are currently not supported by WYSIWYG Filter.

According to the following support request, http://drupal.org/node/682516, the maintainer does not feel the need to support this.

Because the complexity of the HTML involved in image maps.

This filter should not only allow you to use a particular HTML element, but it also needs to make sure you're using its syntax correctly, which is necessary for security reasons.

Image maps involve the use of elements IMG, MAP and AREA. Too complex to parse and validate, we didn't need that feature, and also it is not too common to see this kind of features in WYSIWYG editors.

This feature request is to create the ability to add the the map and area tags and do not attempt to validate the coords attribute.

Thank you,

Comments

markus_petrux’s picture

Status: Active » Closed (won't fix)

Leaving something not validated defeats the whole purpose of an input filter. Security issues may come from just a litte hole.

Honestly, if the site needs to allow using image maps, then a) allow users Full HTML, b) using some kind of macro that is translated into HTML after the filter is executed, c) Try another module implementing this kind of validations.

jansenCreative’s picture

We work with several governments and institutions that request image maps as part of their ADA section 508 compliance requirements, it would be a nice feature to have.

cubeinspire’s picture

I work for international associations and made a module to create maps for any region of the world easily.
Is not exactly as an HTML zone map but it can maybe help.

http://drupal.org/project/simple-pin-map

roflcopterDorrie’s picture

Issue summary: View changes
StatusFileSize
new467 bytes

Whilst not the best solution, here is a patch for 7.x-1.6-rc2 that removes area and map from the blacklist.
You will still need to add area[coords|shape|href|title],map[id|name] to HTML elements and attributes under WYSIWYG Filter to allow it.

roflcopterDorrie’s picture

7.x-1.6-rc3 introduced a blacklist hook (https://www.drupal.org/node/1783966).

The code to remove 'area' and 'map' from the blacklist is as follows:

/**
 * Implements hook_wysiwyg_filter_elements_blocklist_alter().
 */
function MYMODULE_wysiwyg_filter_elements_blacklist_alter(&$blacklist) {
  if (in_array('area', $blacklist)) {
    unset($blacklist['area']);
  }
  if (in_array('map', $blacklist)) {
    unset($blacklist['map']);
  }
}