I am trying to send Richtext data to PHP using Ajax all things working correctly excepts for the font color when I apply the font color it's commenting all the code after that because color is in HEX format i have tried change font color to RGB but it also change after sending to PHP now i have removed it from Textrich but i really need to know how to escape this problem.
This is the code printed by console log
<div><font color="#ff0000">test</font></div>
this what PHP echo
<div><font color="
this is the text rich generating code for font color just need to escape the commenting.
now my problem is i am trying to store text-area data in the database but when text area data process by the PHP it's commenting all the code after #
i need a way to escape that problem
This is my javascript code
`$('#save_btn').click(function(event){
event.preventDefault();
console.log($("#example").val());
if(text()){
$.ajax({
url:'../web/php/addoffer.php?offertitle='+$('#offer_title').val()+'&offer_desc='+$("#example").val()+'&offerstart='+$("#offer_s_date")+'&offerend='+$("#offer_e_date").val(),
type:'GET',
success:function(confirmation){
console.log(confirmation);
}
});
}
});
This is my php code
if(isset($_GET['offertitle']) && isset($_GET['offer_desc']) && isset($_GET['offerstart']) && isset($_GET['offerend'])){
echo $_GET['offer_desc'];
}
This is the text-rich editor i am using