metadata-handling

Removes meta tags and sanitizes JSON-LD script tags from HTML content.

836|66|Updated Feb 3, 2025
One-click install
npx skills add https://github.com/kreuzberg-dev/html-to-markdown --skill metadata-handling
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: metadata-handling
Source: https://github.com/kreuzberg-dev/html-to-markdown/tree/main/.ai-rulez/domains/safety-sanitization/skills/metadata-handling
Command: npx skills add https://github.com/kreuzberg-dev/html-to-markdown --skill metadata-handling

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill prevents the leakage of sensitive information and potential security vulnerabilities by safely handling metadata and structured data within documents.

Core Features & Use Cases

  • Meta Tag Removal: Automatically removes meta tags to prevent tracking and http-equiv exploits.
  • Structured Data Safety: Sanitizes JSON-LD script tags to mitigate Cross-Site Scripting (XSS) risks.
  • Comment Preservation (Optional): Can be configured to preserve comments, though removal is the default to prevent exposing code.
  • Information Leakage Prevention: Implements safeguards against exposing sensitive data.
  • Use Case: When processing user-submitted HTML content, this Skill ensures that no sensitive metadata or executable scripts are retained, protecting both the user and the system.

Quick Start

Safely process the provided HTML content, removing all meta tags and script tags containing JSON-LD.

Frequently Asked Questions about metadata-handling

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I remove meta tags and sanitize JSON-LD script tags in HTML?

To sanitize JSON-LD structured data and remove meta tags from HTML, you need a security process that strips executable scripts and tracking elements. This prevents XSS vulnerabilities and sensitive information leakage in user-submitted content.

Why does keeping HTML comments cause information leakage?

Keeping HTML comments can cause information leakage because developers often leave sensitive code, configuration details, or internal notes in comments. Removing comments by default protects against exposing this underlying system architecture or sensitive data to end users.

What is the best way to prevent XSS vulnerabilities from structured data in HTML?

The best way to prevent XSS vulnerabilities from structured data is to sanitize JSON-LD script tags within the HTML document. This process mitigates cross-site scripting risks by safely handling structured data without retaining executable scripts.

Can I preserve HTML comments while removing meta tags and JSON-LD scripts?

Yes, you can preserve HTML comments while removing meta tags and JSON-LD scripts through optional configuration. While comment removal is the default to prevent exposing code, the metadata handling process can be adjusted to retain them.

Does meta tag removal prevent http-equiv exploits in user-submitted HTML content?

Yes, removing meta tags prevents http-equiv exploits in user-submitted HTML content. Automatic meta tag removal safeguards against tracking and potential security vulnerabilities by ensuring sensitive metadata is not retained.