diff options
| author | Camilo Nova <camilo.nova@gmail.com> | 2016-06-28 11:51:51 -0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-06-28 12:52:09 -0400 |
| commit | e1d83c2f3f617e3c5cf871ecd8942286122ec2b7 (patch) | |
| tree | 86bbab47fb01c32020e4cc6cd3c5768d28a8684c /docs | |
| parent | 54c0dea22ee11da9822fc217f108e878647f299e (diff) | |
[1.9.x] Used strict comparison in docs/ref/csrf.txt's JavaScript.
Backport of 222e1334bf29605925eefa45ff107ca1155e93c0 from master
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/csrf.txt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/ref/csrf.txt b/docs/ref/csrf.txt index df17d138f5..23332760a6 100644 --- a/docs/ref/csrf.txt +++ b/docs/ref/csrf.txt @@ -83,12 +83,12 @@ Acquiring the token is straightforward: // using jQuery function getCookie(name) { var cookieValue = null; - if (document.cookie && document.cookie != '') { + if (document.cookie && document.cookie !== '') { var cookies = document.cookie.split(';'); for (var i = 0; i < cookies.length; i++) { var cookie = jQuery.trim(cookies[i]); // Does this cookie string begin with the name we want? - if (cookie.substring(0, name.length + 1) == (name + '=')) { + if (cookie.substring(0, name.length + 1) === (name + '=')) { cookieValue = decodeURIComponent(cookie.substring(name.length + 1)); break; } |
