title: Passing variable containing a url to an ajax with cakephp leads to error
body: <p>Everything is going well with my ajax code when passing variables, lets say "hello world" but when passing a variable containing such as "hello world http//www.facebook.com" leads to many problems actually.</p>
  
  <p>Actually its the variable "new_textarea" that I am having problem with.
  To clarify things out say,</p>
  
  <pre><code>var new_textarea = "hello world"; //successfully saves it to database
  </code></pre>
  
  <p>but when</p>
  
  <pre><code>var new_textarea = "http://www.facebook.com" // will lead to problems
  </code></pre>
  
  <p>This is my ajax code:</p>
  
  <pre><code>$.ajax({
  url: '/learns/quickpostcomment/'+user_discussion_id+'/'+user_id+'/'+new_textarea+'/'+parent_id,
  success: function(data){
  }});
  </code></pre>
  
  <p>And this is my cakephp:</p>
  
  <pre><code>public function quickpostcomment()
  {
      $post = $this-&gt;params['pass'];
      $this-&gt;ClassroomComment-&gt;create();
      $this-&gt;ClassroomComment-&gt;set('classroom_id', $post[0]);
      $this-&gt;ClassroomComment-&gt;set('user_id', $post[1]);
      $this-&gt;ClassroomComment-&gt;set('comment', $post[2]);
      $this-&gt;ClassroomComment-&gt;set('parent_id', $post[3]);
      $this-&gt;ClassroomComment-&gt;save();
      die;
  }
  </code></pre>
  
  <p>So far all that I inspected is that whats triggering the problem is the "/" or slashes on the variables when variables contain a url.</p>
  
  <p>Is there any way I can pass a variable to my ajax containing slashes or url? 
  I need help badly :(</p>