Title: Dovi Pasted HTML Cleanup
Author: Dovi Solutions
Published: <strong>September 16, 2026</strong>
Last modified: September 16, 2026

---

Search plugins

![](https://ps.w.org/dovi-html-cleanup/assets/icon-256x256.png?rev=3697831)

# Dovi Pasted HTML Cleanup

 By [Dovi Solutions](https://profiles.wordpress.org/dovidev/)

[Download](https://downloads.wordpress.org/plugin/dovi-html-cleanup.1.0.9.zip)

 * [Details](https://wordpress.org/plugins/dovi-html-cleanup/#description)
 * [Reviews](https://wordpress.org/plugins/dovi-html-cleanup/#reviews)
 *  [Installation](https://wordpress.org/plugins/dovi-html-cleanup/#installation)
 * [Development](https://wordpress.org/plugins/dovi-html-cleanup/#developers)

 [Support](https://wordpress.org/support/plugin/dovi-html-cleanup/)

## Description

This plugin improves HTML content hygiene by:

 * Replacing `<b>`/`<i>` with semantic `<strong>`/`<em>` tags
 * Removing inline styles, `class`, `id`, `aria-*`, and `data-*` attributes
 * Flattening `<span>` tags while preserving inner text
 * Cleaning up Elementor’s `text-editor` widgets
 * Running cleanup automatically on post save (for selected post types)
 * Bulk-processing posts via the Tools menu
 * Providing a real-time manual HTML cleanup tool in the admin

Useful for websites that have been copy-pasting styled HTML from other sources (
like Word or Google Docs), or importing messy content from page builders.

### Usage

 * Enable or disable cleanup by post type via the Tools > HTML Cleanup settings.
 * Use the WYSIWYG cleaner to test and clean HTML manually.
 * Click “Start Cleanup” to process all matching posts in batches via AJAX.

## Installation

 1. Upload the plugin folder to the `/wp-content/plugins/` directory.
 2. Activate the plugin through the ‘Plugins’ menu in WordPress.
 3. Go to Tools > HTML Cleanup to configure and run bulk cleanup or use the manual 
    HTML cleaner.

## Reviews

There are no reviews for this plugin.

## Contributors & Developers

“Dovi Pasted HTML Cleanup” is open source software. The following people have contributed
to this plugin.

Contributors

 *   [ Dovi Solutions ](https://profiles.wordpress.org/dovidev/)

[Translate “Dovi Pasted HTML Cleanup” into your language.](https://translate.wordpress.org/projects/wp-plugins/dovi-html-cleanup)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/dovi-html-cleanup/),
check out the [SVN repository](https://plugins.svn.wordpress.org/dovi-html-cleanup/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/dovi-html-cleanup/)
by [RSS](https://plugins.trac.wordpress.org/log/dovi-html-cleanup/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 1.0.9

 * Renamed to Dovi Pasted HTML Cleanup.
 * Admin CSS moved to an enqueued stylesheet; Tools page slug prefixed.

#### 1.0.7

 * Security: all AJAX handlers now require the manage_options capability in addition
   to the nonce.
 * Security: manual cleaner input is bounded with wp_kses_post(); settings inputs
   are unslashed before sanitizing.
 * Fix: update checker registered against the wrong class guard and never ran.
 * Prepared for WordPress.org (Plugin Check clean).

#### 1.0.6

 * **Feature**: Added **Cleanup Scope** settings – users can now choose to clean:
    - Elementor Text Widgets
    - ACF / Other WYSIWYG fields
    - Generic meta keys (ending in `_content`, `_html`, etc.)
 * **Feature**: Added **“Save Settings” buttons** for both Post Types and Cleanup
   Scope with live feedback
 * **Enhancement**: **Preserves `<p>` tags and line breaks** while removing junk
   HTML (`<span>`, `style`, `class`, etc.)
 * **Enhancement**: Manual HTML cleaner now has **Visual + Code tabs**, **auto-cleans
   on paste/type/blur**, and **copies result to clipboard**
 * **Fix**: Bulk cleanup progress bar now accurately shows **0%  100%**
 * **Fix**: Fixed infinite loop risk in `save_post` using **priority 999 + direct
   DB update**
 * **Fix**: Manual cleaner no longer throws `tinymce is not defined` – uses `wp_editor()`
   properly
 * **Fix**: Elementor, ACF, and meta cleanup now work reliably
 * **UI**: Completely redesigned Tools page with clean cards, better spacing, and
   professional layout
 * **Code**: `count_posts_array()` is now a **static class method** (cleaner architecture)

#### 1.0.4

 * Uses WordPress’s wp.editor.initialize() (no “tinymce is not defined”)
 * Works with the wp_editor() output from PHP
 * Auto-cleans on paste / typing
 * Button fallback
 * Bulk-cleanup logic unchanged

#### 1.0.3

 * Mnor format cleanup
 * Added Plugin Update Manager

#### 1.0.1

 * Feature: Tools page now includes a manual HTML cleanup tool (paste and clean 
   instantly)
 * Feature: AJAX checkbox controls for selecting which post types are affected
 * Feature: Settings are saved live when checkboxes are toggled
 * Enhancement: Elementor-style detection and cleanup based on `_elementor_edit_mode`

#### 1.0

 * Initial release with automatic HTML cleanup on post save
 * Handles Elementor text widgets and classic content
 * Includes a bulk processor with progress bar

## Meta

 *  Version **1.0.9**
 *  Last updated **2 days ago**
 *  Active installations **Fewer than 10**
 *  WordPress version ** 5.0 or higher **
 *  Tested up to **7.1**
 *  PHP version ** 7.4 or higher **
 * Tags
 * [cleanup](https://wordpress.org/plugins/tags/cleanup/)[elementor](https://wordpress.org/plugins/tags/elementor/)
   [formatting](https://wordpress.org/plugins/tags/formatting/)[html](https://wordpress.org/plugins/tags/html/)
   [paste](https://wordpress.org/plugins/tags/paste/)
 *  [Advanced View](https://wordpress.org/plugins/dovi-html-cleanup/advanced/)

## Ratings

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/dovi-html-cleanup/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/dovi-html-cleanup/reviews/)

## Contributors

 *   [ Dovi Solutions ](https://profiles.wordpress.org/dovidev/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/dovi-html-cleanup/)