diff --git a/services/web/app/coffee/Features/FileStore/FileStoreController.coffee b/services/web/app/coffee/Features/FileStore/FileStoreController.coffee index 17e3fb40f4..c36ce22151 100644 --- a/services/web/app/coffee/Features/FileStore/FileStoreController.coffee +++ b/services/web/app/coffee/Features/FileStore/FileStoreController.coffee @@ -8,7 +8,12 @@ is_mobile_safari = (user_agent) -> user_agent.indexOf('iPad') >= 0) is_html = (file) -> - file.name.lastIndexOf('.html') == file.name.length - 5 + ends_with = (ext) -> + file.name? and + file.name.length > ext.length and + (file.name.lastIndexOf(ext) == file.name.length - ext.length) + + ends_with('.html') or ends_with('.htm') or ends_with('.xhtml') module.exports =