From 25f6b53e9049724d2b800ee2c391cb236f9e1db1 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Mon, 27 Jun 2022 13:35:01 -0700 Subject: [PATCH] docs: Capitalize Handlebars consistently. Signed-off-by: Anders Kaseorg --- docs/overview/changelog.md | 2 +- docs/testing/linters.md | 2 +- docs/translating/internationalization.md | 2 +- frontend_tests/node_tests/example8.js | 2 +- frontend_tests/zjsunit/namespace.js | 2 +- static/js/message_edit.js | 2 +- static/js/notifications.js | 2 +- static/js/templates.js | 4 ++-- static/js/ui_init.js | 2 +- tools/check-frontend-i18n | 2 +- tools/linter_lib/custom_check.py | 2 +- 11 files changed, 12 insertions(+), 12 deletions(-) diff --git a/docs/overview/changelog.md b/docs/overview/changelog.md index e22a396dde..eeb4c0b1f6 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-07 diff --git a/docs/testing/linters.md b/docs/testing/linters.md index c31e061800..dcc628aa82 100644 --- a/docs/testing/linters.md +++ b/docs/testing/linters.md @@ -9,7 +9,7 @@ patterns that can lead to security bugs. ## Overview Zulip 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.md index 869727d75e..3ba55e73b2 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 is processed by FormatJS, so that the string to be translated wouldn't be constant. 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 same as in JavaScript. You can insert more complex markup using a local diff --git a/frontend_tests/node_tests/example8.js b/frontend_tests/node_tests/example8.js index 70f708d26a..73a5a3b06e 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, learned how 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 that in this test. The below code tests the rendering of typing notifications which diff --git a/frontend_tests/zjsunit/namespace.js b/frontend_tests/zjsunit/namespace.js index b16d3ac091..6d89d4916b 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.js index 8ba71dbf54..c691655cd0 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 Handlebars const 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.js index 67e6df215b..6f3dcfe79c 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.js index 2842790eff..9c20845a7f 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.js index 12f58ab9c8..6da266f059 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-i18n index f146ebdb0a..f6882c9bb9 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.py index 8d6e492696..110845d0db 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/",