History log of /PHP-8.2/ext/tidy/tidy.c (Results 1 – 25 of 265)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 8de7ccb2 20-Jul-2024 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Fix memory leaks in ext/tidy basedir restriction code

TIDY_APPLY_CONFIG can early return because it's a macro, but then the
cleanup paths are not executed. Transform this to a real funct

Fix memory leaks in ext/tidy basedir restriction code

TIDY_APPLY_CONFIG can early return because it's a macro, but then the
cleanup paths are not executed. Transform this to a real function and
handle the cleanups correctly at the callsites.

Closes GH-15046.

show more ...


# c34def58 07-Jul-2024 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Fix memory leak in tidy_repair_file()

When dealing with a file, we must free the contents if the function
fails. While here, also fix the error message because previously it
sounded

Fix memory leak in tidy_repair_file()

When dealing with a file, we must free the contents if the function
fails. While here, also fix the error message because previously it
sounded like the filename was too long while in fact the file itself
is too large.

Closes GH-14862.

show more ...


# b3f483db 21-Dec-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Fix GH-12980: tidynode.props.attribute is missing "Boolean Attributes" and empty attributes

Closes GH-12993.


# f592f75e 20-Feb-2023 ndossche

Add missing error check on tidyLoadConfig

Parse errors were not reported for the default config, they were only
reported when explicitly another config was loaded.
This means that us

Add missing error check on tidyLoadConfig

Parse errors were not reported for the default config, they were only
reported when explicitly another config was loaded.
This means that users may not be aware of errors in their configuration
and therefore the behaviour of Tidy might not be what they intended.
This patch fixes that issue by using a common function. In fact, the
check for -1 might be enough for the current implementation of Tidy, but
the Tidy docs say that any value other than 0 indicates an error.
So future errors might not be caught when just using an error code of -1.
Therefore, this also changes the error code checks of == -1 to < 0 and
== 1 to > 0.

Closes GH-10636

Signed-off-by: George Peter Banyard <girgias@php.net>

show more ...


# 704aadd0 08-Feb-2023 George Peter Banyard

Fix memory leaks in ext-tidy

We must not instantiate the object prior checking error conditions
Moreover, we need to release the HUGE amount of memory for files which are over 4GB when t

Fix memory leaks in ext-tidy

We must not instantiate the object prior checking error conditions
Moreover, we need to release the HUGE amount of memory for files which are over 4GB when throwing a ValueError

Closes GH-10545

show more ...


# 1ad59b32 30-Aug-2022 George Peter Banyard

Update INI validator and displayers depending on INI type

Closes GH-9451


# d7383ed8 20-Aug-2022 Máté Kocsis

Declare ext/tidy constants in stubs (#9383)


# 3b92a966 25-Jun-2022 Ilija Tovilo

Convert return type of various object handlers from int to zend_result (#8755)


# aeb4acac 06-May-2022 Máté Kocsis

Declare tidyNode properties as readonly


# 768d00f8 06-May-2022 Máté Kocsis

Declare tidy properties


# 90b7bde6 03-Nov-2021 Dmitry Stogov

Use more compact representation for packed arrays.

- for packed arrays we store just an array of zvals without keys.
- the elements of packed array are accessible throuf as ht->arPacked[

Use more compact representation for packed arrays.

- for packed arrays we store just an array of zvals without keys.
- the elements of packed array are accessible throuf as ht->arPacked[i]
instead of ht->arData[i]
- in addition to general ZEND_HASH_FOREACH_* macros, we introduced similar
familied for packed (ZEND_HASH_PACKED_FORECH_*) and real hashes
(ZEND_HASH_MAP_FOREACH_*)
- introduced an additional family of macros to access elements of array
(packed or real hashes) ZEND_ARRAY_ELEMET_SIZE, ZEND_ARRAY_ELEMET_EX,
ZEND_ARRAY_ELEMET, ZEND_ARRAY_NEXT_ELEMENT, ZEND_ARRAY_PREV_ELEMENT
- zend_hash_minmax() prototype was changed to compare only values

Because of smaller data set, this patch may show performance improvement
on some apps and benchmarks that use packed arrays. (~1% on PHP-Parser)

TODO:
- sapi/phpdbg needs special support for packed arrays (WATCH_ON_BUCKET).
- zend_hash_sort_ex() may require converting packed arrays to hash.

show more ...


# aff36587 29-Jun-2021 Patrick Allaert

Fixed some spaces used instead of tabs


# 01b3fc03 06-May-2021 KsaR

Update http->https in license (#6945)

1. Update: http://www.php.net/license/3_01.txt to https, as there is anyway server header "Location:" to https.
2. Update few license 3.0 to 3.01 as

Update http->https in license (#6945)

1. Update: http://www.php.net/license/3_01.txt to https, as there is anyway server header "Location:" to https.
2. Update few license 3.0 to 3.01 as 3.0 states "php 5.1.1, 4.1.1, and earlier".
3. In some license comments is "at through the world-wide-web" while most is without "at", so deleted.
4. fixed indentation in some files before |

show more ...


# 09efad61 08-Apr-2021 George Peter Banyard

Use zend_string_equals_(literal_)ci() API more often

Also drive-by usage of zend_ini_parse_bool()

Closes GH-6844


# a730dc0c 15-Feb-2021 Máté Kocsis

Generate class entries for snmp, soap, sockets, sodium, sqlite3, sysv*, tidy

Closes GH-6696


# c8f809fc 25-Jan-2021 Nikita Popov

Remove unnecessary TRUE/FALSE defines in tidy

Instead use standard true/false.


# 3e01f5af 15-Jan-2021 Nikita Popov

Replace zend_bool uses with bool

We're starting to see a mix between uses of zend_bool and bool.
Replace all usages with the standard bool type everywhere.

Of course, zend_bool

Replace zend_bool uses with bool

We're starting to see a mix between uses of zend_bool and bool.
Replace all usages with the standard bool type everywhere.

Of course, zend_bool is retained as an alias.

show more ...


# ce3ff8ec 29-Nov-2020 Christoph M. Becker

php_tidy_create_node() expects a fixed set of node_types

This static function is not supposed to deal with arbitrary
`node_type`s, so there is no need to do so.

Closes GH-6467.


# 221345a0 14-Nov-2020 Christoph M. Becker

Fix #77594: ob_tidyhandler is never reset

We reset to original INI value on request shutdown.

Closes GH-6425.


# d4bf0799 22-Oct-2020 Nikita Popov

Don't crash on uninitialized tidy object

"Uninitialized" here means that the object was created ordinarily
-- no constructor skipping involved. Most tidy methods seem to
handle this

Don't crash on uninitialized tidy object

"Uninitialized" here means that the object was created ordinarily
-- no constructor skipping involved. Most tidy methods seem to
handle this fine, but these three need to be guarded.

show more ...


# e68acd03 07-Oct-2020 Christoph M. Becker

Fix #77040: tidyNode::isHtml() is completely broken

The documentation of `tidyNode::isHtml()` states that this method
"checks if a node is part of a HTML document". That is, of course,

Fix #77040: tidyNode::isHtml() is completely broken

The documentation of `tidyNode::isHtml()` states that this method
"checks if a node is part of a HTML document". That is, of course,
nonsense, since a tidyNode is "an HTML node in an HTML file, as
detected by tidy."

What this method is actually supposed to do is to check whether a node
is an element (unless it is the root element). This has been broken by
commit d8eeb8e[1], which assumed that `enum TidyNodeType` would
represent flags of a bitmask, what it does not.

[1] <http://git.php.net/?p=php-src.git;a=commit;h=d8eeb8e28673236bca3f066ded75037a5bdf6378>

Closes GH-6290.

show more ...


# c98d4769 10-Sep-2020 Máté Kocsis

Consolidate new union type ZPP macro names

They will now follow the canonical order of types. Older macros are
left intact due to maintaining BC.

Closes GH-6112


# 628db3f3 04-Sep-2020 Máté Kocsis

Fix UNKNOWN default values in various extensions

Closes GH-6075


# f7fbc633 14-Aug-2020 Máté Kocsis

Add more precise type info for stubs

Closes GH-6005


# 7476d2c1 28-Aug-2020 Máté Kocsis

Promote warnings to exceptions in ext/tidy

Closes GH-6051


1234567891011