]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Fix case of JavaScript, GitHub and CSS. 2796/head
authorJohn Bampton <jbampton@users.noreply.github.com>
Mon, 23 Dec 2019 22:21:43 +0000 (08:21 +1000)
committerJohn Bampton <jbampton@users.noreply.github.com>
Mon, 23 Dec 2019 22:21:43 +0000 (08:21 +1000)
docs/guide/security.rst
docs/guide/templates.rst
tornado/escape.py
tornado/gen.py
tornado/test/gen_test.py
tornado/web.py
tornado/websocket.py

index 0dedabc3e88bf25e2e895ce6cf943e4df2efc3f2..b65cd3f370e407ca113c4034d6e7124dabd1bf86 100644 (file)
@@ -279,7 +279,7 @@ all requests::
 For ``PUT`` and ``DELETE`` requests (as well as ``POST`` requests that
 do not use form-encoded arguments), the XSRF token may also be passed
 via an HTTP header named ``X-XSRFToken``.  The XSRF cookie is normally
-set when ``xsrf_form_html`` is used, but in a pure-Javascript application
+set when ``xsrf_form_html`` is used, but in a pure-JavaScript application
 that does not use any regular forms you may need to access
 ``self.xsrf_token`` manually (just reading the property is enough to
 set the cookie as a side effect).
index 9230be23e1eabde8604982199b6f70a2c366725c..61ce753e6a955a6c89ed1830cbe452748b3cd68e 100644 (file)
@@ -132,7 +132,7 @@ instead of ``None``.
 
 Note that while Tornado's automatic escaping is helpful in avoiding
 XSS vulnerabilities, it is not sufficient in all cases.  Expressions
-that appear in certain locations, such as in Javascript or CSS, may need
+that appear in certain locations, such as in JavaScript or CSS, may need
 additional escaping.  Additionally, either care must be taken to always
 use double quotes and `.xhtml_escape` in HTML attributes that may contain
 untrusted content, or a separate escaping function must be used for
index 8d2d6bc88296250b761cd2e8fe1f2d258d05a3fe..3cf7ff2e4aaad67b0cb6c69065f67b24abddbfe4 100644 (file)
@@ -69,7 +69,7 @@ def json_encode(value: Any) -> str:
     # JSON permits but does not require forward slashes to be escaped.
     # This is useful when json data is emitted in a <script> tag
     # in HTML, as it prevents </script> tags from prematurely terminating
-    # the javascript.  Some json libraries do this escaping by default,
+    # the JavaScript.  Some json libraries do this escaping by default,
     # although python's standard library does not, so we do it here.
     # http://stackoverflow.com/questions/1580647/json-why-are-forward-slashes-escaped
     return json.dumps(value).replace("</", "<\\/")
index 7cc7ec78579b71294ec503fbeba8a5ccb05851f9..c58884cc934de631572159d12e1b46d84c1bf578 100644 (file)
@@ -221,7 +221,7 @@ def coroutine(
                     # We do this by exploiting the public API
                     # add_done_callback() instead of putting a private
                     # attribute on the Future.
-                    # (Github issues #1769, #2229).
+                    # (GitHub issues #1769, #2229).
                     runner = Runner(result, future, yielded)
                     future.add_done_callback(lambda _: runner)
                 yielded = None
index 659e22605e30a7a1e0d8ef0c34b7d6bec5e94991..2655a509bae2af8f3616d3cd862f7241dca8cad3 100644 (file)
@@ -952,7 +952,7 @@ class RunnerGCTest(AsyncTestCase):
 
     @gen_test
     def test_gc(self):
-        # Github issue 1769: Runner objects can get GCed unexpectedly
+        # GitHub issue 1769: Runner objects can get GCed unexpectedly
         # while their future is alive.
         weakref_scope = [None]  # type: List[Optional[weakref.ReferenceType]]
 
@@ -970,7 +970,7 @@ class RunnerGCTest(AsyncTestCase):
         yield gen.with_timeout(datetime.timedelta(seconds=0.2), tester())
 
     def test_gc_infinite_coro(self):
-        # Github issue 2229: suspended coroutines should be GCed when
+        # GitHub issue 2229: suspended coroutines should be GCed when
         # their loop is closed, even if they're involved in a reference
         # cycle.
         loop = self.get_new_ioloop()
index 0847a9c5e0bdcaf6a2c62b447cf3ffda97203a9f..604aeb361d0a84bed42ef1c79d94917add253489 100644 (file)
@@ -3264,7 +3264,7 @@ class TemplateModule(UIModule):
     Template()) instead of inheriting the outer template's namespace.
 
     Templates rendered through this module also get access to UIModule's
-    automatic javascript/css features.  Simply call set_resources
+    automatic JavaScript/CSS features.  Simply call set_resources
     inside the template and give it keyword arguments corresponding to
     the methods on UIModule: {{ set_resources(js_files=static_url("my.js")) }}
     Note that these resources are output once per template file, not once
index 93ceedb66d5cead94a244170ce8d855b0b22cc4d..c88cc2074d8d2a50427c9490c8f802c1a03802f0 100644 (file)
@@ -190,7 +190,7 @@ class WebSocketHandler(tornado.web.RequestHandler):
 
     Web browsers allow any site to open a websocket connection to any other,
     instead of using the same-origin policy that governs other network
-    access from javascript.  This can be surprising and is a potential
+    access from JavaScript.  This can be surprising and is a potential
     security hole, so since Tornado 4.0 `WebSocketHandler` requires
     applications that wish to receive cross-origin websockets to opt in
     by overriding the `~WebSocketHandler.check_origin` method (see that