(dev/core#1328) Drop support for CIVICRM_SMARTY_DEFAULT_ESCAPE#36304
Merged
Conversation
|
🤖 Thank you for contributing to CiviCRM! ❤️ We will need to test and review this PR. 👷 Introduction for new contributors...
PR commands & links...
|
Member
|
@totten all 5 test failures are the same: |
Contributor
|
I'm personally ok with a different strategy. |
totten
force-pushed
the
master-default-escape
branch
from
July 23, 2026 17:04
27dd644 to
04cc76e
Compare
Member
Author
Squashed with more aggressive dial-down on the test. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
The constant
CIVICRM_SMARTY_DEFAULT_ESCAPEprovided a discreet opt-in with the ambition to invert the Smarty escaping behavior (e.g. preferring to default to HTML-encoding all variables; rather defaulting to passthrough variables). It arose an offshoot from https://lab.civicrm.org/dev/core/-/work_items/1328). However, as later discussions found, it's really hard to design a meaningful transition plan with a single/global switch. So newer work is moving toward per-file opt-in.Which leaves the question - do we still need
CIVICRM_SMARTY_DEFAULT_ESCAPE?(Note: This relates to test-failures in the proposed #36121.)
Before
Setting
CIVICRM_SMARTY_DEFAULT_ESCAPE=truedoes... something to your system.After
Setting
CIVICRM_SMARTY_DEFAULT_ESCAPEdoes nothing. All systems have the same (default) escaping mechanics.Comments
CIVICRM_SMARTY_DEFAULT_ESCAPEbefore, and if you apply the patch, then... you should runcv flushto clear-outtemplates_c. (If someone thinks this is too onerous upgraders... then I could post something like https://gist.github.com/totten/51543aeadd1961455ae12506c95904bf.)