$.post function in jquery repeating url for ajax request
<p>I am trying to make an ajax request with $.post function using jquery. It's repeating the url. If I just type direct url in $.post('<a href="http://url" rel="nofollow">http://url</a>') it works fine.</p>

<pre><code>$(document).ready(function(){

      $('#btnSubmit').on('click', function(e){

                    e.preventDefault();

    var name = $('#name').val();

    var url = "'"+'&lt;?php echo base_url();?&gt;'+"'";   

    console.log(url);

    $.post(url,
    {
      name: name
    },
    function(data,status){
        console.log("Data: " + data + "\nStatus: " + status);
    });
      });  
  });
</code></pre>

<p>result I am getting in console</p>

<pre><code>  "http://localhost:8080/mysite/'localhost:8080/mysite/'"
</code></pre>