Simon Wisselink
a3cbdc46fb
Fix strip_tags modifier for falsy input. ( #893 )
...
Fixes #890
2023-08-04 22:40:19 +02:00
Simon Wisselink
e75165565e
Implement fix and tests
2023-03-24 12:19:34 +01:00
Adrien Poupa
5988116c81
PHP 8.1 deprecation warnings on null strings in modifiers ( #834 )
2023-01-17 00:24:23 +01:00
Progi1984
c016895166
PHP8.2 compatibility ( #775 )
...
* PHP8.2 compatibility
* PHP8.2 compatibility : Fixed unit tests
* PHP8.2 compatibility : Replace ENT_COMPAT by ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401
* PHP8.2 compatibility : Remove deprecated utf8_decode
* PHP8.2 compatibility : Remove HTML-ENTITIES parameter
* Removed some unused code for clarity, updated the changelog.
* More concise escape implementation and unit test to cover both modifierplugin and modifiercompiler.
* Fix htmlall unescape of quotes without mbstring too
Co-authored-by: Simon Wisselink <s.wisselink@iwink.nl >
2022-11-22 21:22:57 +01:00
Simon Wisselink
4550fc0339
Using PHP functions as modifiers now triggers a deprecation notice ( #814 )
...
Fixes #813
2022-09-23 00:09:00 +02:00
Simon Wisselink
612bd3f657
Fixed PHP8.1 deprecation errors in strip_tags ( #803 )
2022-09-22 14:55:20 +02:00
Simon Wisselink
c53342c9fc
Silence deprecation errors for strtime in PHP8.1 or higher
...
Fixes #672 (#811 )
2022-09-22 14:11:36 +02:00
Hypolite Petovan
d683641f90
Fix wrong indentation in libs/plugins/modifier.capitalize.php ( #802 )
2022-09-18 11:14:59 +02:00
Simon Wisselink
813c83f7a3
Fixed unselected year/month/day not working in html_select_date
...
Fixes #395
2022-09-14 12:44:37 +02:00
Simon Wisselink
55ea25d1f5
Applied appropriate javascript and html escaping in mailto plugin to counter injection attacks
...
Fixes #454
2022-09-14 11:38:18 +02:00
Simon Wisselink
d304d349b4
Fixed PHP8.1 deprecation errors in capitalize modifier
...
Fixes #789
2022-09-13 12:19:44 +02:00
Simon Wisselink
5479e3362c
Fixed use of rand()
without a parameter in math function ( #795 )
...
* Fixed use of `rand()` without a parameter in math function
Fixes #794
2022-09-12 12:13:42 +02:00
Simon Wisselink
f8f97b4e2d
Fixed PHP8.1 deprecation errors in upper modifier #788
2022-09-10 12:34:20 +02:00
Mark Fettig
1bc7c722a3
address PHP 8.1 'explode', 'number_format', and 'replace' deprecations ( #755 )
2022-09-09 22:39:24 +02:00
Simon Wisselink
f4b26a3cbf
Fixed second param of unescape modifier ( #778 )
...
Fixes #777
2022-08-01 23:49:19 +02:00
Simon Wisselink
20a8026ccd
Merge branch 'fix-issue-549-v3' of github.com:AnrDaemon/smarty into AnrDaemon-fix-issue-549-v3 ( #771 )
2022-07-19 22:55:07 +02:00
Libor M
a2e1df1768
PHP 8.1: fix deprecation in escape modifier
2022-02-08 13:30:19 +01:00
Simon Wisselink
3cc56392c6
prevent float to int cast deprecation warning in truncate modifier
...
Fixes #699
2022-02-06 22:20:05 +01:00
Pavel Kochman
02633ecaba
math equation return warning: math: illegal character for : {math equation="max(x, y)" x=$x y=$y}
2022-02-04 21:03:25 +01:00
Claas Augner
059bea274c
Support multiple operators in math equations ( #708 )
...
* fix(math): fix equation regexp
Fixes #702 .
2022-01-18 00:10:17 +01:00
Simon Wisselink
215d81a9fa
Merge pull request from GHSA-29gp-2c3m-3j6m
...
* Temporary fix. Waiting for CVE
* Add CVE
2022-01-10 00:01:43 +01:00
Simon Wisselink
c7576eb1a1
Rewrote the mailto function to not use eval
when encoding with javascript
2022-01-09 23:15:25 +01:00
Darek Krzysztofiak
cd962280ce
Fix for php 8.0 ( #687 )
...
* Fix PHP 8.0
$parts must be an array, because the argument for count() must be countable, mb_split() returns an array or a boolean.
2021-12-03 17:13:52 +01:00
Simon Wisselink
39b69f0142
Feature/php8 support ( #629 )
...
Adds support for PHP8.0, dropping support for PHP7.0 and below.
Backwards incompatible changes:
- Dropped support for php asp tags in templates (removed from php since php7.0)
- Dropped deprecated API calls that where only accessible through SmartyBC
- Dropped support for {php} and {include_php} tags and embedded PHP in templates. Embedded PHP will now be passed through as is.
- Removed all PHP_VERSION_ID and compare_version checks and conditional code blocks that are now no longer required
- Dropped deprecated SMARTY_RESOURCE_CHAR_SET and SMARTY_RESOURCE_DATE_FORMAT constants
- Dropped deprecated Smarty::muteExpectedErrors and Smarty::unmuteExpectedErrors API methods
- Dropped deprecated $smarty->getVariable() method. Use $smarty->getTemplateVars() instead.
- $smarty->registerResource() no longer accepts an array of callback functions
See the changelog for more details.
Switched CI from Travis to Github CI.
2021-10-13 12:15:17 +02:00
Simon Wisselink
3b0fd82849
Merge branch 'escape' of https://github.com/m-haritonov/smarty into m-haritonov-escape
2021-08-19 15:26:27 +02:00
David Goodwin
039043e5a2
Update modifier.escape.php ( #649 )
...
trigger a notice if an incorrect modifier was used (E.g.|escape:quotes vs |escape:quote).
2021-03-21 21:21:55 +01:00
Mihail Haritonov
9cde36e3bc
plugins: escape: javascript escaping secure fix
2021-02-28 16:44:56 +03:00
uwetews
b05bc1b617
- bugfix in date-format modifier; NULL at date string or default_date did not produce correct output
...
https://github.com/smarty-php/smarty/pull/458
2018-10-11 09:22:23 +02:00
uwetews
4f7cd8f1b3
- reformating for PSR-2 coding standards https://github.com/smarty-php/smarty/pull/483
2018-08-31 16:45:09 +02:00
uwetews
799b5cb342
- fix PSR-2 coding standards and PHPDoc blocks https://github.com/smarty-php/smarty/pull/452
...
https://github.com/smarty-php/smarty/pull/475
https://github.com/smarty-php/smarty/pull/473
- bugfix PHP5.2 compatibility https://github.com/smarty-php/smarty/pull/472
2018-08-19 02:35:46 +02:00
Sławomir Kaleta
2404095783
Update PSR-2
2018-06-12 09:58:15 +02:00
Uwe Tews
860ebb618e
- bugfix plugins may not be loaded if {function} or {block} tags are executed in nocache mode
2018-03-28 07:35:52 +02:00
Uwe Tews
96fd914cc1
bugfix rework of newline spacing between tag code and template text.
...
now again identical with Smarty2 (forum topic 26878)
2017-11-20 04:07:51 +01:00
Uwe Tews
654659aadf
remove html tags from PHPDoc blocks
2017-11-11 07:11:33 +01:00
Uwe Tews
3fc8abeb98
code cleanup and optimizations 3.1.32-dev-34
2017-11-06 01:02:56 +01:00
Uwe Tews
dd9c076dfa
- correction of PHPDoc blocks
...
- minor code cleanup
2017-10-26 10:25:41 +02:00
Uwe Tews
db16d0d2e6
fixed typo
2017-08-06 02:58:05 +02:00
Uwe Tews
5cc9b27784
- bugfix wordwrap modifier could fail if used in nocache code.
...
converted plugin file shared.mb_wordwrap.php into modifier.mb_wordwrap.php
2017-08-05 19:59:23 +02:00
uwetews
e51b0ac4af
- performance store flag for already required shared plugin functions in static variable or
...
Smarty's $_cache to improve performance when plugins are often called
51e0d5cd40 (commitcomment-22280086)
2017-05-27 11:04:00 +02:00
klemens
51a0e764e8
spelling fixes
2017-04-08 12:10:39 +02:00
uwetews
e62b40c421
- improvement {math} misleading E_USER_WARNING messages when parameter value = null https://github.com/smarty-php/smarty/issues/288
2016-09-11 00:23:37 +02:00
uwetews
7e230713c6
- improvement {math} misleading E_NOTICE messages when parameter value = null https://github.com/smarty-php/smarty/issues/288 (reverted from commit 810881c76e
)
2016-09-11 00:21:45 +02:00
uwetews
810881c76e
- improvement {math} misleading E_NOTICE messages when parameter value = null https://github.com/smarty-php/smarty/issues/288
2016-09-11 00:13:29 +02:00
uwetews
51e0d5cd40
- performance require_once should be called only once for shared plugins https://github.com/smarty-php/smarty/issues/280
2016-09-06 04:26:46 +02:00
uwetews
e1d27d68d7
- performance require_once should be called only once for shared plugins https://github.com/smarty-php/smarty/issues/280
2016-09-02 01:08:50 +02:00
uwetews
2003020df9
- bugfix remove constant DS as shortcut for DIRECTORY_SEPARATOR as the user may have defined it to something else https://github.com/smarty-php/smarty/issues/277
2016-08-23 08:03:39 +02:00
uwetews
eb2d9d4e6d
- improvement remove double funtion declaration in plugin shared.escape_special_cars.php https://github.com/smarty-php/smarty/issues/229
2016-07-23 22:37:17 +02:00
uwetews
50068ca52a
- bugfix {match} shell injection vulnerability patch provided by Tim Weber
2016-07-19 20:17:47 +02:00
uwetews
608064e5f2
-bugfix Only variables should be assigned by reference https://github.com/smarty-php/smarty/issues/227
2016-05-07 13:46:37 +02:00
uwetews
3756588858
- improvement added KnockoutJS comments to trimwhitespace outputfilter https://github.com/smarty-php/smarty/issues/82
...
https://github.com/smarty-php/smarty/pull/181
2016-02-11 22:05:45 +01:00