First of all, correcting the page encoding (before UTF-8, preferably using <meta http-equiv="content-type" content="text/html; charset=utf-8"/>immediately after <head>) and ensuring that your editor is configured to UTF-8, is usually a very good idea.
Otherwise, replacing - (in JavaScript code, not HTML) is the way to go. \u00f1
JavaScript - HTML XML, ñ ñ.