Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
docs: Capitalize Handlebars consistently.
Anders Kaseorg25f6b53e9049
diff --git a/docs/overview/changelog.md b/docs/overview/changelog.mdindex e22a396ddef..eeb4c0b1f63 100644--- a/docs/overview/changelog.md+++ b/docs/overview/changelog.md@@ -2314,7 +2314,7 @@ running a version from before 1.7 should upgrade directly to 1.7.1.### 1.5.2 -- 2017-06-01- CVE-2017-0896: Restricting inviting new users to admins was broken.-- CVE-2015-8861: Insecure old version of handlebars templating engine.+- CVE-2015-8861: Insecure old version of Handlebars templating engine.### 1.5.1 -- 2017-02-07diff --git a/docs/testing/linters.md b/docs/testing/linters.mdindex c31e061800d..dcc628aa82b 100644--- a/docs/testing/linters.md+++ b/docs/testing/linters.md@@ -9,7 +9,7 @@ patterns that can lead to security bugs.## OverviewZulip does extensive linting of much of its source code, including-Python/JavaScript/TypeScript files, HTML templates (Django/handlebars), CSS files,+Python/JavaScript/TypeScript files, HTML templates (Django/Handlebars), CSS files,JSON fixtures, Markdown documents, puppet manifests, and shell scripts.For some files we simply check for small things like trailing whitespace,diff --git a/docs/translating/internationalization.md b/docs/translating/internationalization.mdindex 869727d75e2..3ba55e73b2f 100644--- a/docs/translating/internationalization.md+++ b/docs/translating/internationalization.md@@ -293,7 +293,7 @@ translated block, because they don't work properly with translation.The Handlebars expression would be evaluated before the string isprocessed by FormatJS, so that the string to be translated wouldn't beconstant. We have a linter to enforce that translated blocks don't-contain handlebars.+contain Handlebars.Restrictions on including HTML tags in translated strings are the sameas in JavaScript. You can insert more complex markup using a localdiff --git a/frontend_tests/node_tests/example8.js b/frontend_tests/node_tests/example8.jsindex 70f708d26af..73a5a3b06ed 100644--- a/frontend_tests/node_tests/example8.js+++ b/frontend_tests/node_tests/example8.js@@ -10,7 +10,7 @@ const $ = require("../zjsunit/zjquery");Until now, we had seen various testing techniques, learnedhow to use helper functions like `mock_esm`, `override` of`run_test` etc., but we didn't see how to deal with- render calls to handlebars templates. We'll learn that+ render calls to Handlebars templates. We'll learn thatin this test.The below code tests the rendering of typing notifications whichdiff --git a/frontend_tests/zjsunit/namespace.js b/frontend_tests/zjsunit/namespace.jsindex b16d3ac0917..6d89d4916b2 100644--- a/frontend_tests/zjsunit/namespace.js+++ b/frontend_tests/zjsunit/namespace.js@@ -264,7 +264,7 @@ exports.zrequire = function (short_fn) {There is no need to zrequire templates.js.The test runner automatically registers the- Handlebar extensions.+ Handlebars extensions.`,);diff --git a/static/js/message_edit.js b/static/js/message_edit.jsindex 8ba71dbf545..c691655cd0a 100644--- a/static/js/message_edit.js+++ b/static/js/message_edit.js@@ -417,7 +417,7 @@ function edit_message($row, raw_content) {editability === editability_types.TOPIC_ONLY ||editability === editability_types.FULL ||is_stream_editable;- // current message's stream has been already been added and selected in handlebar+ // current message's stream has been already been added and selected in Handlebarsconst available_streams = is_stream_editable? stream_data.subscribed_subs().map((stream) => ({name: stream.name,diff --git a/static/js/notifications.js b/static/js/notifications.jsindex 67e6df215b1..6f3dcfe79cf 100644--- a/static/js/notifications.js+++ b/static/js/notifications.js@@ -531,7 +531,7 @@ export function send_test_notification(content) {}// Note that this returns values that are not HTML-escaped, for use in-// handlebars templates that will do further escaping.+// Handlebars templates that will do further escaping.function get_message_header(message) {if (message.type === "stream") {return message.stream + " > " + message.topic;diff --git a/static/js/templates.js b/static/js/templates.jsindex 2842790eff4..9c20845a7f0 100644--- a/static/js/templates.js+++ b/static/js/templates.js@@ -3,9 +3,9 @@ import Handlebars from "handlebars/runtime";import {default_html_elements, intl} from "./i18n";import * as util from "./util";-// Below, we register Zulip-specific extensions to the handlebars API.+// Below, we register Zulip-specific extensions to the Handlebars API.//-// IMPORTANT: When adding a new handlebars helper, update the+// IMPORTANT: When adding a new Handlebars helper, update the// knownHelpers array in the webpack config so that webpack knows your// helper is registered at runtime and don't try to require them when// bundling.diff --git a/static/js/ui_init.js b/static/js/ui_init.jsindex 12f58ab9c8d..6da266f0599 100644--- a/static/js/ui_init.js+++ b/static/js/ui_init.js@@ -590,7 +590,7 @@ export function initialize_everything() {// These components must be initialized early, because other// modules' initialization has not been audited for whether they// expect DOM elements to always exist (As that did before these- // modules were migrated from Django templates to handlebars).+ // modules were migrated from Django templates to Handlebars).initialize_left_sidebar();initialize_right_sidebar();initialize_compose_box();diff --git a/tools/check-frontend-i18n b/tools/check-frontend-i18nindex f146ebdb0a5..f6882c9bb91 100755--- a/tools/check-frontend-i18n+++ b/tools/check-frontend-i18n@@ -41,7 +41,7 @@ if __name__ == "__main__":if not found:sys.exit(0)- print(WARNING + "Translation strings contain handlebars:" + ENDC)+ print(WARNING + "Translation strings contain Handlebars:" + ENDC)print("\n".join(found))print(diff --git a/tools/linter_lib/custom_check.py b/tools/linter_lib/custom_check.pyindex 8d6e492696e..110845d0db3 100644--- a/tools/linter_lib/custom_check.py+++ b/tools/linter_lib/custom_check.py@@ -137,7 +137,7 @@ js_rules = RuleList("static/js/dialog_widget.js","frontend_tests/",},- "description": "Setting HTML content with jQuery .html() can lead to XSS security bugs. Consider .text() or using rendered_foo as a variable name if content comes from handlebars and thus is already sanitized.",+ "description": "Setting HTML content with jQuery .html() can lead to XSS security bugs. Consider .text() or using rendered_foo as a variable name if content comes from Handlebars and thus is already sanitized.",},{"pattern": "[\"']json/",