Improved ${cursor} handling in HTML and TPL (smarty) files