Fixes HtmlFormat to check for view path and set basePath and baseUrl at encoding stage instead of the constructor to balance for the Scope way