paper_robots Posted December 6, 2008 Share Posted December 6, 2008 First off , I'm using a jquery real text editor. Nice and simple. It even turns my &'s into &'s. However, I'm using an ajax post to put the text into a database. And it only saves everything before the ampersand. I've tried mysql_real_escape_string and htmlentities. I even tried not cleaning the variable but its still cutting off. I alert my javascript variable before I send the ajax call and all my &'s are intact. But I'm echoing my $_POST['description'] variable and its cut off. Any ideas? Link to comment https://forums.phpfreaks.com/topic/135826-solved-post-not-liking-ampersand/ Share on other sites More sharing options...
gevans Posted December 6, 2008 Share Posted December 6, 2008 could you url encode it on the javascript side and urldecode it in php before putting into the database? Link to comment https://forums.phpfreaks.com/topic/135826-solved-post-not-liking-ampersand/#findComment-707976 Share on other sites More sharing options...
paper_robots Posted December 6, 2008 Author Share Posted December 6, 2008 I figured it out. I serialized the data before sending through the ajax call and that seemed to do the trick. Link to comment https://forums.phpfreaks.com/topic/135826-solved-post-not-liking-ampersand/#findComment-708033 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.