![]() |
PHP adding characters to jQuery.AJAX posted string - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: PHP adding characters to jQuery.AJAX posted string (/showthread.php?tid=56838) |
PHP adding characters to jQuery.AJAX posted string - El Forum - 01-24-2013 [eluser]Unknown[/eluser] Couldn't find any answer to this online, or via the search function, so I decided posting it: I've got a form, like any other, being posted to an AJAX controller within CodeIgniter. The following code is part of a larger form which is being posted. Code: <tr> The form is being serialized, and pushed to the ajax to be saved with this code: Code: var data = { The serialized result of the 'content' variable when console.logged: firstname=1&firstname_required=1&prefix=1&lastname=1&lastname_required=1&homePhone=1&homePhone_required=1&emailAddress=1&emailAddress_required=1&ef1;_label=&ef1_clang=Code&ef2;_label=&ef2_clang=Code&ef3;_label=&ef3_clang=Code&ef4;_label=&ef4_clang=Code But then when I echo it out in PHP it looks like this: firstname=1&firstname_required=1&prefix=1&lastname=1&lastname_required=1&homePhone=1&homePhone_required=1&emailAddress=1&emailAddress_required=1&ef1;_label=&ef1_clang=Code&ef2;_label=&ef2_clang=Code&ef3;_label=&ef3_clang=Code&ef4;_label=&ef4_clang=Code Notice the `;` added on all the `_label` variables... Tried renaming the variables, placing it on top of the form etc... Nothing works; PHP keeps adding the `;` on those text fields. Even stripped the controller down to this: Code: public function save_form_content() Anyone got any idea? Thanks in advance! PHP adding characters to jQuery.AJAX posted string - El Forum - 01-24-2013 [eluser]Unknown[/eluser] It was the $config['global_xss_filtering'], still strange that it only adds characters at certain fields though... PHP adding characters to jQuery.AJAX posted string - El Forum - 01-24-2013 [eluser]monoclonal[/eluser] see existing thread: http://ellislab.com/forums/viewthread/230325/ |