Special characters are not recognized in CKEditor

0

Good day I'm working with the plugin ckeditor and all good, the problem comes when trying to save text with special characters, I send them to a php java that later makes the registration in the database but not the It recognizes, mocha me the text that contains special characters. I know this could be a problem for this pluggin.

How could I solve this?

This is the code I'm using

    function insert()
    {
      var editorData = editor.getData();
      var contenido = editorData.replace(/ /gi, ' ');
      var id_respuesta = $("#id_respuesta").val();

      $.ajax({
          type: "POST",
          url: "clases/registrar_respuesta.php",
          data: "id_usuario=" + id_usuario + "&id_pregunta=" + id_pregunta 
                + "&contenido=" + contenido + "&id_respuesta=" + id_respuesta, 
          success: function(data)
          {
             window.location.href = 'responder.php?id_pregunta=' + id_pregunta;
          }         
      });
    }
    
asked by 14.03.2018 в 23:04
source

0 answers