Mercurial > defr > drupal > scald > dnd
comparison dnd.module @ 27:9a92410be362
Fixed json decoding, which I will now proceed to throw out.
author | David Eads <eads@chicagotech.org> |
---|---|
date | Fri, 13 Mar 2009 19:34:05 -0500 |
parents | 69db20fdbac2 |
children | 7d6bf2dca269 |
comparison
equal
deleted
inserted
replaced
26:45c6c48c2a88 | 27:9a92410be362 |
---|---|
135 } | 135 } |
136 | 136 |
137 $request = drupal_http_request($settings['url']); | 137 $request = drupal_http_request($settings['url']); |
138 | 138 |
139 // We must remove some Drupal escaping | 139 // We must remove some Drupal escaping |
140 $json = json_decode(str_replace(array('\x3c', '\x3e', '\x26'), array("<", ">", "&"), $request->data), TRUE); | 140 $json = json_decode(str_replace(array('\x3c', '\x3e', '\x26', "\'"), array("<", ">", "&", "'"), $request->data), TRUE); |
141 | 141 |
142 // Generate an array of editor representations to add | 142 // Generate an array of editor representations to add |
143 if (is_array($json['editor_representations'])) { | 143 if (is_array($json['editor_representations'])) { |
144 foreach ($json['editor_representations'] as $editor_id=>$editor_item) { | 144 foreach ($json['editor_representations'] as $editor_id=>$editor_item) { |
145 $editor_representations[$editor_id] = $editor_item; | 145 $editor_representations[$editor_id] = $editor_item; |