possible issue with fb.start and json delimiting in 6.0x

Page: 1

Author Post
Member
Registered: Feb 2013
Posts: 30
Dear Admin,
as it seems there could be an issue regarding calls to fb.start with json delimited vars via GET in 6.02.

for me fb.start truncates the string at the first " it finds inside the string.
in 5.7 and greater there was 'normal behavior' without any truncation.

i've generated a simple testpage, where u can try this - same calls, once to jquery and once to fb.start - calling string is displayed in an alert window previous to ajax call, after confirmation the call is triggered and result gets displayed.

https://lab.mynaru.com/diag/start.html

thanks and best regards,
wolfgang
Administrator
Registered: Aug 2008
Posts: 3382
"GET" components that contain interesting characters should be encoded in a properly formed URI. In your code this can be done with encodeURIComponent(json_str). When properly encoded, the URI will be properly parsed and sent.

That being said, I've tweaked the code for the next Floatbox release to better handle such problematic unencoded URIs by running them through the fb.encodeHTML function prior to parsing.
Member
Registered: Feb 2013
Posts: 30
Dear Admin,

thank you very much for your very quick reply and the workaround.

best regards,
wolfgang

Page: 1