encodeURIComponent
as opposed to escape
or encodeURI
. For details why, seehttp://xkr.us/articles/javascript/encode-compare/ .
I learned this by researching why the solution at http://www.captain.at/howto-ajax-form-post-request.php did not work for me. For example, if I use
escape
, the '+' symbol converts to a space in the database; and if I use encodeURI
, any '&' will cause all subsequent characters to not make it into the database -- because those characters aren't converted with the other two Javascript methods.
No comments:
Post a Comment