Simplify HTML icon

Simplify HTML

Simplify HTML to clean up messy code

Overview

This node simplifies HTML code to clean up messy or complex HTML input. It is useful for scenarios where you need to process and clean HTML content, such as preparing HTML for further processing, improving readability, or removing unnecessary clutter. For example, it can be used to clean up HTML copied from web pages or generated by other tools.

Use Case Examples

  1. Simplify HTML content before storing it in a database.
  2. Clean up HTML input from user submissions to ensure consistent formatting.

Properties

Name Meaning
HTML The HTML code string that needs to be simplified.
Include Href Attributes A boolean flag to determine whether href attributes should be included in the simplified output.

Output

JSON

  • output - The simplified HTML string after processing.

Dependencies

  • An internal or external simplifyHtml function/module is required to perform the HTML simplification.

Troubleshooting

  • If the input HTML is malformed or extremely complex, the simplification might not work as expected or could produce incomplete output.
  • Ensure the 'html' input property is provided and is a valid HTML string; otherwise, the node may throw errors or return empty output.
  • If the 'includeHref' property is set incorrectly, href attributes might be unintentionally included or excluded.

Discussion