HTML-Valid

 view release on metacpan or  search on metacpan

lib/HTML/Valid.pod  view on Meta::CPAN

This option specifies if Tidy should discard empty elements.

=item drop-empty-paras

    $htv->set_option ('drop-empty-paras', <value>);

Type: true or false

Default: true

This option specifies if Tidy should discard empty paragraphs.

=item drop-font-tags

    $htv->set_option ('drop-font-tags', <value>);

Type: true or false

Default: false

Deprecated; I<do not use>. This option is destructive to C<< <font> >> tags, and it will be removed from future versions of Tidy. Use the C<< clean >> option instead. 

If you do set this option despite the warning it will perform as C<< clean >> except styles will be inline instead of put into a CSS class. C<< <font> >> tags will be dropped completely and their styles will not be preserved. 

If both C<< clean >> and this option are enabled, C<< <font> >> tags will still be dropped completely, and other styles will be preserved in a CSS class instead of inline. 

See C<< clean >> for more information.

=item drop-proprietary-attributes

    $htv->set_option ('drop-proprietary-attributes', <value>);

Type: true or false

Default: false

This option specifies if Tidy should strip out proprietary attributes, such as Microsoft data binding attributes.

=item enclose-block-text

    $htv->set_option ('enclose-block-text', <value>);

Type: true or false

Default: false

This option specifies if Tidy should insert a C<< <p> >> element to enclose any text it finds in any element that allows mixed content for HTML transitional but not HTML strict.

=item enclose-text

    $htv->set_option ('enclose-text', <value>);

Type: true or false

Default: false

This option specifies if Tidy should enclose any text it finds in the body element within a C<< <p> >> element.

This is useful when you want to take existing HTML and use it with a style sheet.

=item escape-cdata

    $htv->set_option ('escape-cdata', <value>);

Type: true or false

Default: false

This option specifies if Tidy should convert C<< <![CDATA[]]> >> sections to normal text.

=item fix-backslash

    $htv->set_option ('fix-backslash', <value>);

Type: true or false

Default: true

This option specifies if Tidy should replace backslash characters C<< \ >> in URLs with forward slashes C<< / >>.

=item fix-bad-comments

    $htv->set_option ('fix-bad-comments', <value>);

Type: true or false

Default: true

This option specifies if Tidy should replace unexpected hyphens with C<< = >> characters when it comes across adjacent hyphens. 

The default is C<< yes >>. 

This option is provided for users of Cold Fusion which uses the comment syntax: C<< <!--- ---> >>.

=item fix-uri

    $htv->set_option ('fix-uri', <value>);

Type: true or false

Default: true

This option specifies if Tidy should check attribute values that carry URIs for illegal characters and if such are found, escape them as HTML4 recommends.

=item force-output

    $htv->set_option ('force-output', <value>);

Type: true or false

Default: false

This option specifies if Tidy should produce output even if errors are encountered. 

Use this option with care; if Tidy reports an error, this means Tidy was not able to (or is not sure how to) fix the error, so the resulting output may not reflect your intention.

=item gdoc

    $htv->set_option ('gdoc', <value>);

Type: true or false

Default: false

This option specifies if Tidy should enable specific behavior for cleaning up HTML exported from Google Docs.

=item gnu-emacs

    $htv->set_option ('gnu-emacs', <value>);

Type: true or false

Default: false

This option specifies if Tidy should change the format for reporting errors and warnings to a format that is more easily parsed by GNU Emacs.

=item hide-comments

    $htv->set_option ('hide-comments', <value>);

Type: true or false

Default: false

This option specifies if Tidy should print out comments.

=item hide-endtags

    $htv->set_option ('hide-endtags', <value>);

Type: true or false

Default: false

This option is an alias for C<< omit-optional-tags >>.

=item indent

    $htv->set_option ('indent', <value>);

Type: integer

Default: 0

This option specifies if Tidy should indent block-level tags. 

If set to C<< auto >> Tidy will decide whether or not to indent the content of tags such as C<< <title> >>, C<< <h1> >>-C<< <h6> >>, C<< <li> >>, C<< <td> >>, or C<< <p> >> based on the content including a block-level element. 

Setting C<< indent >> to C<< yes >> can expose layout bugs in some browsers. 

Use the option C<< indent-spaces >> to control the number of spaces or tabs output per level of indent, and C<< indent-with-tabs >> to specify whether spaces or tabs are used.

=item indent-attributes

    $htv->set_option ('indent-attributes', <value>);

Type: true or false

Default: false

This option specifies if Tidy should begin each attribute on a new line.

=item indent-cdata

    $htv->set_option ('indent-cdata', <value>);

Type: true or false

Default: false

This option specifies if Tidy should indent C<< <![CDATA[]]> >> sections.

=item indent-spaces

    $htv->set_option ('indent-spaces', <value>);

Type: integer

Default: 2

This option specifies the number of spaces or tabs that Tidy uses to indent content when C<< indent >> is enabled. 

Note that the default value for this option is dependent upon the value of C<< indent-with-tabs >> (see also).

=item indent-with-tabs

    $htv->set_option ('indent-with-tabs', <value>);

Type: true or false

Default: false

This option specifies if Tidy should indent with tabs instead of spaces, assuming C<< indent >> is C<< yes >>. 

Set it to C<< yes >> to indent using tabs instead of the default spaces. 

Use the option C<< indent-spaces >> to control the number of tabs output per level of indent. Note that when C<< indent-with-tabs >> is enabled the default value of C<< indent-spaces >> is reset to C<< 1 >>. 

Note C<< tab-size >> controls converting input tabs to spaces. Set it to zero to retain input tabs.

=item input-xml

    $htv->set_option ('input-xml', <value>);

Type: true or false

Default: false

This option specifies if Tidy should use the XML parser rather than the error correcting HTML parser.

=item join-classes

    $htv->set_option ('join-classes', <value>);

Type: true or false

Default: false

This option specifies if Tidy should combine class names to generate a single, new class name if multiple class assignments are detected on an element.

=item join-styles

    $htv->set_option ('join-styles', <value>);

Type: true or false



( run in 3.797 seconds using v1.01-cache-2.11-cpan-cdf2f3d4e48 )