Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
javascript
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
16 Feb 2008 at 18:08 UTC
Updated:
26 Dec 2010 at 06:03 UTC
Jump to comment: Most recent file
Comments
Comment #1
pwolanin commentedAhh - investigation reveals that json_encode() does not escape < > or & the way drupal_to_js() does - thus there are HTML errors when the AHAH tries to get the updated form.
Comment #2
pwolanin commentednew patch - leave drupal_to_js() so we can escape to HTML-safe, but use the built-in json_encode() for efficiency.
With this the upload form AHAH, at least, seems to work right.
Comment #3
wim leersSubscribing. Looking good! :)
Comment #4
pwolanin commentedtested with PHP 5.2.4, Mac 10.4, FF 2.0 and Safari 3.0, apache 1.3:
book, upload, poll module AHA all works fine, user autocomplete field in node form works fine.
Comment #5
joshk commentedTested also in ie6 and ie7. Poll, book, upload and autocomplete all work.
Comment #6
dries commentedI committed this to CVS HEAD. Thanks.
Comment #7
kkaefer commentedNote: I asked Steven about why he introduced the escaping in the first place, since everything seems to work fine without. The reason he put that into place is because it was required for the upload.module's iframe mechanism. This however, has been removed (and replaced with AHAH). That means, that we can get rid of the encoding after we tested that everything still works.
Comment #8
pwolanin commented@kk - during my testing it did NOT work when the escaping was removed. See the first patch.
Comment #9
pwolanin commentedback to fixed
Comment #10
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #11
klonosDoes this need backporting to d6 (in order to help with upgrade to jQuery 1.4.x)?
PS: Changed status in order to gain some attention - don't mean to bust anyone's b@lls here. Feel free to change back if it is irrelevant, but it does seem to solve this #818138: jQuery 1.4.x compatibility in Hierarchical Select.
Comment #12
pwolanin commentedI think this is closed in terms of core, certainly for Drupal 6.x.
Comment #13
klonosCare to explain why Peter? Is it because d7 requires php 5.2 (that has json_encode() built-in) while d6 requires 4.4+ instead? If so, I think there could be a check to detect php version and then if >5.2 use json_encode(), if <5.2 use drupal_to_js().