diff options
| author | Tim Graham <timograham@gmail.com> | 2019-03-28 19:51:54 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2019-03-28 19:51:54 -0400 |
| commit | 8e675e2bd8366adf5d0b579accfef75a7b1bc3bf (patch) | |
| tree | 5e6d3174fee559e79f7d3eb37729b694788f56c6 /docs/ref | |
| parent | 4400d8296d268f5a8523cd02ddc33b12219b2535 (diff) | |
Fixed #30299 -- Removed jQuery dependency from getCookie() in CSRF docs.
Diffstat (limited to 'docs/ref')
| -rw-r--r-- | docs/ref/csrf.txt | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/docs/ref/csrf.txt b/docs/ref/csrf.txt index 19ddc1345a..e961d76a02 100644 --- a/docs/ref/csrf.txt +++ b/docs/ref/csrf.txt @@ -84,13 +84,12 @@ Acquiring the token is straightforward: .. code-block:: javascript - // using jQuery function getCookie(name) { var cookieValue = null; if (document.cookie && document.cookie !== '') { var cookies = document.cookie.split(';'); for (var i = 0; i < cookies.length; i++) { - var cookie = jQuery.trim(cookies[i]); + var cookie = cookies[i].trim(); // Does this cookie string begin with the name we want? if (cookie.substring(0, name.length + 1) === (name + '=')) { cookieValue = decodeURIComponent(cookie.substring(name.length + 1)); |
