Skip to content

Commit f095413

Browse files
Merge branch 'develop' into fix-sync-request-after-get-change
2 parents 90199d6 + 94e9a16 commit f095413

4 files changed

Lines changed: 25 additions & 7 deletions

File tree

‎.github/carson.yml‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ subscribers:
1313
settings:
1414
auto-labeler:
1515
sync_labels: true
16+
sync_exempt:
17+
- enhancement
1618
rules:
1719
- label: '4.8' # @todo change value whenever the next minor version is changed
1820
base_branch: ['^4\.8$']
@@ -66,7 +68,7 @@ settings:
6668
pr-title-linter:
6769
name: 'Carson / pr-title-linter'
6870
rules:
69-
- pattern: '^(\[\d+\.\d+\]\s{1})?(feat|fix|chore|docs|perf|refactor|style|test|config|revert)(\([\-.@:`a-zA-Z0-9]+\))?!?:\s{1}\S.+\S|Prep for \d\.\d\.\d release|\d\.\d\.\d (Ready|Merge) code$'
71+
- pattern: '^(?:(?:\[\d+\.\d+\] )?(?:feat|fix|chore|docs|perf|refactor|style|test|config|revert)(?:\([\-.@:`a-zA-Z0-9]+\))?!?: \S.+\S|Prep for \d+\.\d+\.\d+ release|\d+\.\d+\.\d+ (?:Ready|Merge) code)$'
7072
description: 'PR title must include the type (feat, fix, chore, docs, perf, refactor, style, test, config, revert) of the commit per Conventional Commits specification. See https://www.conventionalcommits.org/en/v1.0.0/ for the discussion.'
7173
level: error
7274
signed-commits:

‎.github/workflows/run-carson.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ permissions: {}
2828

2929
jobs:
3030
carson:
31+
if: github.repository == 'codeigniter4/CodeIgniter4'
3132
runs-on: ubuntu-24.04
3233
steps:
3334
- name: Run Carson

‎user_guide_src/source/general/caching.rst‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ of time that a page should remain cached before being refreshed.
2626
request is also taken into account. This means that the same URI will be
2727
cached separately if the HTTP method is different.
2828

29+
.. warning:: Web Page Caching is shared between requests with the same HTTP
30+
method and URI. Its cache key does not vary by authenticated user, cookies,
31+
authorization headers, ``Cache-Control``, or ``Vary``. Do not use it for
32+
protected or personalized responses, as cached responses may be returned
33+
before authentication and authorization filters run.
34+
2935
When a page is loaded for the first time, the page will be cached using the
3036
currently configured cache engine. On subsequent page loads, the cache
3137
will be retrieved and sent to the requesting user's browser.

‎user_guide_src/source/outgoing/view_parser.rst‎

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -320,16 +320,25 @@ In this case, you will write code in your template::
320320
Escaping Data
321321
=============
322322

323-
By default, all variable substitution is escaped to help prevent XSS attacks on your pages. CodeIgniter's ``esc()`` method
324-
supports several different contexts, like general ``html``, when it's in an HTML ``attr``, in ``css``, etc. If nothing
325-
else is specified, the data will be assumed to be in an HTML context. You can specify the context used by using the ``esc()``
326-
filter::
323+
Variable substitutions without filters are escaped by default to help prevent XSS attacks on your pages.
324+
CodeIgniter's ``esc()`` method supports several contexts, such as ``html``, ``attr``, and ``css``.
325+
If no context is specified, the Parser uses ``html``. You can specify the context with the ``esc`` filter::
327326

328327
{ user_styles | esc(css) }
329328
<a href="{ user_link | esc(attr) }">{ title }</a>
330329

331-
There will be times when you absolutely need something to used and NOT escaped. You can do this by adding exclamation
332-
marks to the opening and closing braces::
330+
When a substitution uses one or more filters, the Parser does not add an ``esc`` filter automatically.
331+
This also applies when a context is specified with ``setData()`` or ``setVar()``.
332+
Add ``esc`` explicitly when filtering untrusted data. Filters run from left to right, so its position matters::
333+
334+
{ title|capitalize|esc }
335+
{ body|esc|nl2br }
336+
337+
In the second example, ``esc`` escapes the input before ``nl2br`` adds HTML ``<br>`` tags.
338+
Escaping after ``nl2br`` would display those tags as text.
339+
Unknown filter names are ignored, but still prevent automatic escaping; check filter names carefully.
340+
341+
To disable automatic escaping for a substitution without filters, add exclamation marks to its delimiters::
333342

334343
{! unescaped_var !}
335344

0 commit comments

Comments
 (0)