HTML Cleaner Options

HTML Cleaner Options

/autoCorrectedTags=<tag>[;...]

Use this option to define HTML tags closed automatically.

For example, XHTML uses the following syntax:

<ul>
<li>item1</li>
<li>item2</li>
</ul>

So, the li tag must have a closing /li tag.

To parse HTML without the closing tag, you need to add it to the autoCorrectedTags option.

<ul>
<li>item1
<li>item2
</ul>

The default value for this option contains tags: li, p, and a.

You may change the default value in the configuration file.

/cleanHtml

Use this option to clean downloaded HTML files.

You may use the clean-html mode to clean local files and find the right cleaning options.

You may customize cleaning rules with the configuration file and the following output options:

autoCorrectedTags, cutAttributes, cutComments, cutIDs, cutTags

/cutAttributes=<attribute>[;...]

Use this option to remove specified HTML attributes in the clean-html mode or in the downloaded files with the cleanHtml option.

For example:

/cutAttributes=data-vars-event-action,data-vars-event-label

/cutComments

Use this option to remove HTML comments in the clean-html mode or in the downloaded files with the cleanHtml option.

/cutIDs=<id>[;...]

Use this option to remove HTML nodes with the specified id values in the clean-html mode or in the downloaded files with the cleanHtml option.

You may use this option, for example, to remove navigation and advertisement elements.

/cutScripts

Use this option to remove HTML script and noscript tags, and on* event attributes in the clean-html mode or in the downloaded files with the cleanHtml option.

/cutStyles

Use this option to remove HTML style tags, style and class attributes in the clean-html mode or in the downloaded files with the cleanHtml option.

/cutTags=<tag>[;...]

Use this option to remove HTML nodes with the specified tags in the clean-html mode or in the downloaded files with the cleanHtml option.

For example:

/cutTags=amp-install-serviceworker,amp-state,amp-analytics,amp-user-notification
This website is using cookies. By continuing to browse, you give us your consent to our use of cookies as explained in our Cookie Policy.