Fix replace() call by removing single quotes and adding leading slash.