<span id="description">
<?php echo $itemdesc ?>
</span>
The above PHP outputs part of the URL that displays something like this:
This%2520is%2520the%2520 %2520thing%2520 %2520purchased%2520
And what I want is this:
This is the thing purchased
Here's my code. My problem is the /g tag (global) doesn't seem to be working.
<script>
oldhtml = $('#description').html();
var newhtml = oldhtml.replace("%2520"/g, " ");
$('#description').html(newhtml);
</script>