What version of Prototype are you using? The 1.5.1_x versions convert 
the parameters property into a hash using String#toQueryParams and then 
back to a string using Hash.toQueryString so you might want to test your 
callback string with these functions.. i.e.

callback:function(form, value) {
  var paramString = 'id=' + escape('137') + '&tags=' + escape(value);
  var paramHash = paramString.toQueryParams();
  if(paramString != Hash.toQueryString(paramHash)){
    alert('not equal!');
  }
  console.debug(paramString); //firebug
  console.debug(Hash.toQueryString(paramHash));
  return paramString;
}

If you get the "not equal!" alert or the same "malformed URI sequence" 
error, let us know and report the problem on the Prototype:Core google 
group.

Colin

Spiceee wrote:
> Hey,
>
> Why would this "id=137&tags=com%E9dia%2C%20lala" spawn a "malformed
> URI sequence" error on both Firefox and Safari when using
> InPlaceEditor?
>
> All I'm doing is:
>
> //<![CDATA[
>         new Ajax.InPlaceEditor('tags', 'add_tags/', {rows:1,
> callback:function(form, value) { return 'id=' + escape('137') +
> '&tags=' + escape(value) }})
> //]]>
>
> When I remove the escape from the tags value the problem goes away (at
> least for the utf8 encoded strings, which seems to be the source of
> the problem), but if any special URI char is entered in tags (such as
> &, = or ?) it spoils the whole query...
>
> Firefox fails at this line of prototype:
>
>  237 var value = pair[1] ? decodeURIComponent(pair[1]) : undefined;
>
> Thanks,
>
> fabio.
>
> >
>
>   


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to