summaryrefslogtreecommitdiff
path: root/ext/tidy
Commit message (Collapse)AuthorAgeFilesLines
* Don't crash on uninitialized tidy objectNikita Popov2020-10-222-3/+39
| | | | | | "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.
* Fix #77040: tidyNode::isHtml() is completely brokenChristoph M. Becker2020-10-072-4/+34
| | | | | | | | | | | | | | | | 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.
* Merge branch 'PHP-7.2' into PHP-7.3Anatol Belski2018-12-091-1/+1
|\ | | | | | | | | * PHP-7.2: Fix syntax error
| * Fix syntax errorAnatol Belski2018-12-091-1/+1
| |
* | Merge branch 'PHP-7.2' into PHP-7.3Anatol Belski2018-12-092-261/+167
|\ \ | |/ | | | | | | * PHP-7.2: Fix libtidy exports when ext/tidy compiled static
| * Fix libtidy exports when ext/tidy compiled staticAnatol Belski2018-12-092-261/+167
| |
* | Merge branch 'PHP-7.2' into PHP-7.3Christoph M. Becker2018-10-171-0/+1
|\ \ | |/ | | | | | | * PHP-7.2: Fix #77027: tidy::getOptDoc() not available on Windows
| * Merge branch 'PHP-7.1' into PHP-7.2Christoph M. Becker2018-10-171-0/+1
| |\ | | | | | | | | | | | | * PHP-7.1: Fix #77027: tidy::getOptDoc() not available on Windows
| | * Fix #77027: tidy::getOptDoc() not available on WindowsChristoph M. Becker2018-10-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | We define the `HAVE_TIDYOPTGETDOC` macro unconditionally, since the Windows PHP SDK ships libtidy 2009/04/06 or newer for a long time. We do not add a regression test, since 021.phpt already tests `tidy_get_opt_doc`, but has previously been skipped due to unavailability of the function.
| | * Sync leading and final newlines in *.phpt sectionsPeter Kokot2018-10-1511-11/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds missing newlines, trims multiple redundant final newlines into a single one, and trims redundant leading newlines in all *.phpt sections. According to POSIX, a line is a sequence of zero or more non-' <newline>' characters plus a terminating '<newline>' character. [1] Files should normally have at least one final newline character. C89 [2] and later standards [3] mention a final newline: "A source file that is not empty shall end in a new-line character, which shall not be immediately preceded by a backslash character." Although it is not mandatory for all files to have a final newline fixed, a more consistent and homogeneous approach brings less of commit differences issues and a better development experience in certain text editors and IDEs. [1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206 [2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2 [3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
| | * Trim trailing whitespace in *.phptPeter Kokot2018-10-1418-24/+24
| | |
| | * Sync leading and final newlines in source code filesPeter Kokot2018-10-143-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds missing newlines, trims multiple redundant final newlines into a single one, and trims redundant leading newlines. According to POSIX, a line is a sequence of zero or more non-' <newline>' characters plus a terminating '<newline>' character. [1] Files should normally have at least one final newline character. C89 [2] and later standards [3] mention a final newline: "A source file that is not empty shall end in a new-line character, which shall not be immediately preceded by a backslash character." Although it is not mandatory for all files to have a final newline fixed, a more consistent and homogeneous approach brings less of commit differences issues and a better development experience in certain text editors and IDEs. [1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206 [2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2 [3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
| | * Trim trailing whitespace in source code filesPeter Kokot2018-10-135-36/+36
| | |
| * | Sync leading and final newlines in *.phpt sectionsPeter Kokot2018-10-1511-11/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds missing newlines, trims multiple redundant final newlines into a single one, and trims redundant leading newlines in all *.phpt sections. According to POSIX, a line is a sequence of zero or more non-' <newline>' characters plus a terminating '<newline>' character. [1] Files should normally have at least one final newline character. C89 [2] and later standards [3] mention a final newline: "A source file that is not empty shall end in a new-line character, which shall not be immediately preceded by a backslash character." Although it is not mandatory for all files to have a final newline fixed, a more consistent and homogeneous approach brings less of commit differences issues and a better development experience in certain text editors and IDEs. [1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206 [2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2 [3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
| * | Trim trailing whitespace in *.phptPeter Kokot2018-10-1418-24/+24
| | |
| * | Sync leading and final newlines in source code filesPeter Kokot2018-10-143-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds missing newlines, trims multiple redundant final newlines into a single one, and trims redundant leading newlines. According to POSIX, a line is a sequence of zero or more non-' <newline>' characters plus a terminating '<newline>' character. [1] Files should normally have at least one final newline character. C89 [2] and later standards [3] mention a final newline: "A source file that is not empty shall end in a new-line character, which shall not be immediately preceded by a backslash character." Although it is not mandatory for all files to have a final newline fixed, a more consistent and homogeneous approach brings less of commit differences issues and a better development experience in certain text editors and IDEs. [1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206 [2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2 [3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
| * | Trim trailing whitespace in source code filesPeter Kokot2018-10-135-36/+36
| | |
* | | Sync leading and final newlines in *.phpt sectionsPeter Kokot2018-10-1511-11/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds missing newlines, trims multiple redundant final newlines into a single one, and trims redundant leading newlines in all *.phpt sections. According to POSIX, a line is a sequence of zero or more non-' <newline>' characters plus a terminating '<newline>' character. [1] Files should normally have at least one final newline character. C89 [2] and later standards [3] mention a final newline: "A source file that is not empty shall end in a new-line character, which shall not be immediately preceded by a backslash character." Although it is not mandatory for all files to have a final newline fixed, a more consistent and homogeneous approach brings less of commit differences issues and a better development experience in certain text editors and IDEs. [1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206 [2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2 [3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
* | | Trim trailing whitespace in *.phptPeter Kokot2018-10-1417-23/+23
| | |
* | | Sync leading and final newlines in source code filesPeter Kokot2018-10-141-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds missing newlines, trims multiple redundant final newlines into a single one, and trims redundant leading newlines. According to POSIX, a line is a sequence of zero or more non-' <newline>' characters plus a terminating '<newline>' character. [1] Files should normally have at least one final newline character. C89 [2] and later standards [3] mention a final newline: "A source file that is not empty shall end in a new-line character, which shall not be immediately preceded by a backslash character." Although it is not mandatory for all files to have a final newline fixed, a more consistent and homogeneous approach brings less of commit differences issues and a better development experience in certain text editors and IDEs. [1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206 [2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2 [3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
* | | Fix arginfo for tidy::__construct()Tyson Andre2018-08-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was split out of PR #3439 Previously, the arginfo was wrong for these methods. getNumberOfRequiredParameters() was 4 for that method. Compare with http://php.net/manual/en/tidy.construct.php) This fixes the arginfo added to PHP 7.3 in 97353cda99
* | | Remove unused Git attributes identPeter Kokot2018-07-253-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The $Id$ keywords were used in Subversion where they can be substituted with filename, last revision number change, last changed date, and last user who changed it. In Git this functionality is different and can be done with Git attribute ident. These need to be defined manually for each file in the .gitattributes file and are afterwards replaced with 40-character hexadecimal blob object name which is based only on the particular file contents. This patch simplifies handling of $Id$ keywords by removing them since they are not used anymore.
* | | Sync tidy phpinfo extension versionPeter Kokot2018-06-041-4/+1
| | | | | | | | | | | | | | | | | | This patch removes the tidy extension Git ident attribute blob name from the phpinfo output to be synced with other extensions versioning system and replaces table header with normal row in the first tidy info table.
* | | Export standard object handlers, to avoid indirect accessDmitry Stogov2018-05-311-1/+1
| | |
* | | Use zend_string_release_ex() instread of zend_string_release() in places, ↵Dmitry Stogov2018-05-281-4/+4
| | | | | | | | | | | | where we sure about string persistence.
* | | Remove return types from some magic method in protosGabriel Caruso2018-03-091-1/+1
| | | | | | | | | | | | __construct, __destruct, __wakeup does not have return types defined.
* | | Remove duplicated testsGabriel Caruso2018-02-221-42/+0
| | |
* | | Use EXPECT instead of EXPECTF when possibleGabriel Caruso2018-02-201-1/+1
| | | | | | | | | | | | EXPECTF logic in run-tests.php is considerable, so let's avoid it.
* | | Fixes for #74707 some methods of tidy class didn't have arginfo declaredGabriel Caruso2018-02-121-7/+18
| | |
* | | Fixed bug #74707Gabriel Caruso2018-02-101-25/+38
| | | | | | | | | | | | Several tidy functions receive a tidy object as mandatory parameter
* | | Use bool instead of boolean in protoGabriel Caruso2018-02-041-15/+15
| | |
* | | Show the tidyp name, if it was usedAnatol Belski2018-01-251-1/+1
| | |
* | | Add missing define after e7da9685Anatol Belski2018-01-251-0/+1
| | |
* | | Tidy extension update to be able to either use tidy or tidyp at configure timeDavid Carlier2018-01-253-9/+38
| | |
* | | Merge branch 'PHP-7.2'Anatol Belski2018-01-111-4/+1
|\ \ \ | |/ / | | | | | | | | | * PHP-7.2: Fix test for libtidy 5.6.0
| * | Merge branch 'PHP-7.1' into PHP-7.2Anatol Belski2018-01-111-4/+1
| |\ \ | | |/ | | | | | | | | | * PHP-7.1: Fix test for libtidy 5.6.0
| | * Fix test for libtidy 5.6.0Anatol Belski2018-01-111-4/+1
| | | | | | | | | | | | | | | | | | libtidy 5.6.0 remove the language option from the library, it is only supported on cli. Prior to that, this option was not used in the library. Thus, exclude the option presence from test.
| | * year++Xinchen Hui2018-01-022-2/+2
| | |
| | * Update copyright headers to 2017Sammy Kaye Powers2017-01-042-2/+2
| | |
| * | year++Xinchen Hui2018-01-022-2/+2
| | |
* | | year++Xinchen Hui2018-01-022-2/+2
| | |
* | | Add _IS_NUMBER as cast_object() target typeNikita Popov2017-12-261-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | convert_scalar_to_number() will now call cast_object() with an _IS_NUMBER argument, in which case the cast handler should return either an integer or floating point number, whichever is more appropriate. Previously convert_scalar_to_number() unconditionally converted objects to integers instead. Fixes bug #53033. Fixes bug #54973. Fixes bug #73108.
* | | Cleanup type conversionDmitry Stogov2017-12-071-24/+10
| | |
* | | Add zend_object_alloc() APINikita Popov2017-11-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using ecalloc() to create objects is expensive, because the dynamic-size memset() is unreasonably slow. Make sure we only zero the main object structure with known size, as the properties are intialized separately anyway. Technically we do not need to zero the embedded zend_object structure either, but as long as the memset argument is constant, a couple more bytes don't really matter.
* | | Remove tidy examplesPeter Kokot2017-10-194-202/+0
| | | | | | | | | | | | | | | | | | PHP documentation already includes explanations and examples for most of tidy extension. Tidy PHP functions and methods used in the examples are also already used in the tests.
* | | Remove README from ext/tidy in favor of the PHP docsPeter Kokot2017-10-081-7/+0
| | | | | | | | | | | | | | | The tidy introduction includes an outdated link to tidy HTML library homepage, and PHP documentation presents the tidy PHP extension better instead.
* | | Get rid of all these old package[2].xml files, most of these had no had a ↵Kalle Sommer Nielsen2017-08-171-65/+0
|/ / | | | | | | | | | | release since PHP4, or any release at all in close to 10 years, some even did not have a package registered at pecl OCI, PDO_OCI and zip are left as they are actively developed and released there
* | Update copyright headers to 2017Sammy Kaye Powers2017-01-022-2/+2
| |
* | further normalizations, uint vs uint32_tAnatol Belski2016-11-261-8/+8
|/ | | | | | fix merge mistake yet one more replacement run
* improve lib name guessing for newer libtidyAnatol Belski2016-11-091-5/+12
| | | | | | FreeBSD calls it tidy5. Still, the check is not perfect, as both old and new lib can coexist. ATM, the preference is to pick up the old lib, still. In it's absense the new one will be looked up.