mirror of
https://github.com/tecnickcom/TCPDF.git
synced 2025-03-23 23:49:42 +01:00
Fix phpdoc and prefer null as default value (#444)
* Fix phpdoc and prefer null as default value Co-authored-by: Michael Voříšek <mvorisek@mvorisek.cz> Co-authored-by: Nicola Asuni <nicolaasuni@users.noreply.github.com>
This commit is contained in:
parent
8b63af1b4d
commit
df4a8e6f96
@ -1140,8 +1140,8 @@ class TCPDF_STATIC {
|
||||
* Cleanup HTML code (requires HTML Tidy library).
|
||||
* @param string $html htmlcode to fix
|
||||
* @param string $default_css CSS commands to add
|
||||
* @param array $tagvs parameters for setHtmlVSpace method
|
||||
* @param array $tidy_options options for tidy_parse_string function
|
||||
* @param array|null $tagvs parameters for setHtmlVSpace method
|
||||
* @param array|null $tidy_options options for tidy_parse_string function
|
||||
* @param array $tagvspaces Array of vertical spaces for tags.
|
||||
* @return string XHTML code cleaned up
|
||||
* @author Nicola Asuni
|
||||
@ -1151,7 +1151,7 @@ class TCPDF_STATIC {
|
||||
*/
|
||||
public static function fixHTMLCode($html, $default_css, $tagvs, $tidy_options, &$tagvspaces) {
|
||||
// configure parameters for HTML Tidy
|
||||
if ($tidy_options === '') {
|
||||
if (TCPDF_STATIC::empty_string($tidy_options)) {
|
||||
$tidy_options = array (
|
||||
'clean' => 1,
|
||||
'drop-empty-paras' => 0,
|
||||
@ -1198,7 +1198,7 @@ class TCPDF_STATIC {
|
||||
// remove some empty tag blocks
|
||||
$html = preg_replace('/<div([^\>]*)><\/div>/', '', $html);
|
||||
$html = preg_replace('/<p([^\>]*)><\/p>/', '', $html);
|
||||
if ($tagvs !== '') {
|
||||
if (!TCPDF_STATIC::empty_string($tagvs)) {
|
||||
// set vertical space for some XHTML tags
|
||||
$tagvspaces = $tagvs;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user