How to escape "&" and "+" in raw during POST client-side

that approach works.

data = { title: "New Topic Title", category: "uncategorized", raw: "whatever" };
datatopost =  $.param(data);

 $.ajax({
            url: "http://community.yoch.tv/posts/",
            type: 'POST',
            dataType: 'json',
            //contentType: 'application/json',
            contentType: 'application/x-www-form-urlencoded; charset=UTF-8',
            processData: false,
            data: datatopost,
            success: function (data) {
          console.log(JSON.stringify(data));
        },
        error: function(){
            console.log(JSON.stringify(data));
          console.log("Cannot get data");
        }
        });