You are here

function features_dom_encode_map in Features 6

Same name and namespace in other branches
  1. 7.2 features.admin.inc \features_dom_encode_map()
  2. 7 features.admin.inc \features_dom_encode_map()

Returns encoding map for decode and encode options.

2 calls to features_dom_encode_map()
features_dom_decode_options in ./features.admin.inc
Decode an array of option values that have been encoded by features_dom_encode_options().
features_dom_encode_options in ./features.admin.inc
Make a Drupal options array safe for usage with jQuery DOM selectors. Encodes known bad characters into __[ordinal]__ so that they may be safely referenced by JS behaviors.

File

./features.admin.inc, line 804

Code

function features_dom_encode_map() {
  return array(
    ':' => '__' . ord(':') . '__',
    '/' => '__' . ord('/') . '__',
    ',' => '__' . ord(',') . '__',
    '.' => '__' . ord('.') . '__',
    '<' => '__' . ord('<') . '__',
    '>' => '__' . ord('>') . '__',
  );
}