Due to some Javascript actions to vars I got &
instead of &
in my var:
So I tried this:
url_summer = \'http://192.168.0.2
var tt=$('#title').val();
var title=tt.replace(/\&/g,'').replace(/\&/g,'');
$('#new_title').html(title)
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<input name="title" class="text txt100 valid" type="text" id="title" value="Remove and symbol Definition & How it is done" size="100" maxlength="200">
<p id="new_title"></p>
var url="http://192.168.0.20/menulb.phpw=chapter&if=If_menulb&p=521"
var elem = document.createElement('textarea');
elem.innerHTML = url;
var decoded = elem.innerText;
Decode it like this:
var str = "http://192.168.0.20/menulb.php?w=chapter&if=If_menulb&p=521";
var div = document.createElement('div');
div.innerHTML = str
var decoded = div.firstChild.nodeValue;
url_summer = url_summer.replace('amp;', '');