fix double quotes in javascript (replace with single quotes); implement navigation confirmation