Skip to content

Commit c0d6d81

Browse files
committed
Add docs for cakephp/cakephp#17750
1 parent 9556f21 commit c0d6d81

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

en/appendices/5-1-migration-guide.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,3 +166,5 @@ Helpers
166166
* ``stripProtocol``: Strips ``http://`` and ``https://`` from the beginning of the link. Default off.
167167
* ``maxLength``: The maximum length of the link label. Default off.
168168
* ``ellipsis``: The string to append to the end of the link label. Defaults to UTF8 version.
169+
- ``HtmlHelper::meta()`` can now create a meta tag containing the current CSRF
170+
token using ``meta('csrfToken')``.

en/views/helpers/html.rst

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -137,14 +137,15 @@ key in the $attributes parameter to ``true``, ie - ``['block' => true]``.
137137
If you set the "type" attribute using the $attributes parameter,
138138
CakePHP contains a few shortcuts:
139139

140-
======== ======================
141-
type translated value
142-
======== ======================
143-
html text/html
144-
rss application/rss+xml
145-
atom application/atom+xml
146-
icon image/x-icon
147-
======== ======================
140+
========= ======================
141+
type translated value
142+
========= ======================
143+
html text/html
144+
rss application/rss+xml
145+
atom application/atom+xml
146+
icon image/x-icon
147+
csrfToken The current CSRF token
148+
========= ======================
148149

149150
.. code-block:: php
150151
@@ -215,6 +216,9 @@ In addition to making predefined meta tags, you can create link elements::
215216
Any attributes provided to meta() when called this way will be added to the
216217
generated link tag.
217218

219+
.. versionchanged:: 5.1.0
220+
The ``csrfToken`` type was added.
221+
218222
Linking to Images
219223
-----------------
220224

0 commit comments

Comments
 (0)