{"id":368658,"date":"2026-09-16T00:05:17","date_gmt":"2026-09-16T00:05:17","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/html-cleanup-on-save\/"},"modified":"2026-09-16T00:24:37","modified_gmt":"2026-09-16T00:24:37","slug":"dovi-html-cleanup","status":"publish","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/dovi-html-cleanup\/","author":16261374,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.0.9","stable_tag":"1.0.9","tested":"7.1.1","requires":"5.0","requires_php":"7.4","requires_plugins":null,"header_name":"Dovi Pasted HTML Cleanup","header_author":"Dovi Solutions","header_description":"Cleans up post content, Elementor widgets, ACF WYSIWYG fields and other meta.","assets_banners_color":"","last_updated":"2026-09-16 00:24:37","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"","header_author_uri":"","rating":0,"author_block_rating":0,"active_installs":0,"downloads":59,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","changelog"],"tags":{"1.0.9":{"tag":"1.0.9","author":"dovidev","date":"2026-09-16 00:24:37","revision":3697800}},"upgrade_notice":[],"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3697831,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3697831,"resolution":"256x256","location":"assets","locale":"","width":256,"height":256}},"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.9"],"block_files":[],"assets_screenshots":[],"screenshots":[]},"plugin_section":[],"plugin_tags":[3786,76538,1975,246,18126],"plugin_category":[46],"plugin_contributors":[280968],"plugin_business_model":[],"class_list":["post-368658","plugin","type-plugin","status-publish","hentry","plugin_tags-cleanup","plugin_tags-elementor","plugin_tags-formatting","plugin_tags-html","plugin_tags-paste","plugin_category-editor-and-writing","plugin_contributors-dovidev","plugin_committers-dovidev"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/dovi-html-cleanup\/assets\/icon-128x128.png?rev=3697831","icon_2x":"https:\/\/ps.w.org\/dovi-html-cleanup\/assets\/icon-256x256.png?rev=3697831","generated":false},"screenshots":[],"raw_content":"<!--section=description-->\n<p>This plugin improves HTML content hygiene by:<\/p>\n\n<ul>\n<li>Replacing <code>&lt;b&gt;<\/code>\/<code>&lt;i&gt;<\/code> with semantic <code>&lt;strong&gt;<\/code>\/<code>&lt;em&gt;<\/code> tags<\/li>\n<li>Removing inline styles, <code>class<\/code>, <code>id<\/code>, <code>aria-*<\/code>, and <code>data-*<\/code> attributes<\/li>\n<li>Flattening <code>&lt;span&gt;<\/code> tags while preserving inner text<\/li>\n<li>Cleaning up Elementor's <code>text-editor<\/code> widgets<\/li>\n<li>Running cleanup automatically on post save (for selected post types)<\/li>\n<li>Bulk-processing posts via the Tools menu<\/li>\n<li>Providing a real-time manual HTML cleanup tool in the admin<\/li>\n<\/ul>\n\n<p>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.<\/p>\n\n<h3>Usage<\/h3>\n\n<ul>\n<li>Enable or disable cleanup by post type via the Tools &gt; HTML Cleanup settings.<\/li>\n<li>Use the WYSIWYG cleaner to test and clean HTML manually.<\/li>\n<li>Click \u201cStart Cleanup\u201d to process all matching posts in batches via AJAX.<\/li>\n<\/ul>\n\n<!--section=installation-->\n<ol>\n<li>Upload the plugin folder to the <code>\/wp-content\/plugins\/<\/code> directory.<\/li>\n<li>Activate the plugin through the 'Plugins' menu in WordPress.<\/li>\n<li>Go to Tools &gt; HTML Cleanup to configure and run bulk cleanup or use the manual HTML cleaner.<\/li>\n<\/ol>\n\n<!--section=changelog-->\n<h4>1.0.9<\/h4>\n\n<ul>\n<li>Renamed to Dovi Pasted HTML Cleanup.<\/li>\n<li>Admin CSS moved to an enqueued stylesheet; Tools page slug prefixed.<\/li>\n<\/ul>\n\n<h4>1.0.7<\/h4>\n\n<ul>\n<li>Security: all AJAX handlers now require the manage_options capability in addition to the nonce.<\/li>\n<li>Security: manual cleaner input is bounded with wp_kses_post(); settings inputs are unslashed before sanitizing.<\/li>\n<li>Fix: update checker registered against the wrong class guard and never ran.<\/li>\n<li>Prepared for WordPress.org (Plugin Check clean).<\/li>\n<\/ul>\n\n<h4>1.0.6<\/h4>\n\n<ul>\n<li><strong>Feature<\/strong>: Added <strong>Cleanup Scope<\/strong> settings \u2013 users can now choose to clean:\n\n<ul>\n<li>Elementor Text Widgets<\/li>\n<li>ACF \/ Other WYSIWYG fields<\/li>\n<li>Generic meta keys (ending in <code>_content<\/code>, <code>_html<\/code>, etc.)<\/li>\n<\/ul><\/li>\n<li><strong>Feature<\/strong>: Added <strong>\"Save Settings\" buttons<\/strong> for both Post Types and Cleanup Scope with live feedback<\/li>\n<li><strong>Enhancement<\/strong>: <strong>Preserves <code>&lt;p&gt;<\/code> tags and line breaks<\/strong> while removing junk HTML (<code>&lt;span&gt;<\/code>, <code>style<\/code>, <code>class<\/code>, etc.)<\/li>\n<li><strong>Enhancement<\/strong>: Manual HTML cleaner now has <strong>Visual + Code tabs<\/strong>, <strong>auto-cleans on paste\/type\/blur<\/strong>, and <strong>copies result to clipboard<\/strong><\/li>\n<li><strong>Fix<\/strong>: Bulk cleanup progress bar now accurately shows <strong>0% \u2192 100%<\/strong><\/li>\n<li><strong>Fix<\/strong>: Fixed infinite loop risk in <code>save_post<\/code> using <strong>priority 999 + direct DB update<\/strong><\/li>\n<li><strong>Fix<\/strong>: Manual cleaner no longer throws <code>tinymce is not defined<\/code> \u2013 uses <code>wp_editor()<\/code> properly<\/li>\n<li><strong>Fix<\/strong>: Elementor, ACF, and meta cleanup now work reliably<\/li>\n<li><strong>UI<\/strong>: Completely redesigned Tools page with clean cards, better spacing, and professional layout<\/li>\n<li><strong>Code<\/strong>: <code>count_posts_array()<\/code> is now a <strong>static class method<\/strong> (cleaner architecture)<\/li>\n<\/ul>\n\n<h4>1.0.4<\/h4>\n\n<ul>\n<li>Uses WordPress\u2019s wp.editor.initialize() (no \u201ctinymce is not defined\u201d)<\/li>\n<li>Works with the wp_editor() output from PHP<\/li>\n<li>Auto-cleans on paste \/ typing<\/li>\n<li>Button fallback<\/li>\n<li>Bulk-cleanup logic unchanged<\/li>\n<\/ul>\n\n<h4>1.0.3<\/h4>\n\n<ul>\n<li>Mnor format cleanup<\/li>\n<li>Added Plugin Update Manager<\/li>\n<\/ul>\n\n<h4>1.0.1<\/h4>\n\n<ul>\n<li>Feature: Tools page now includes a manual HTML cleanup tool (paste and clean instantly)<\/li>\n<li>Feature: AJAX checkbox controls for selecting which post types are affected<\/li>\n<li>Feature: Settings are saved live when checkboxes are toggled<\/li>\n<li>Enhancement: Elementor-style detection and cleanup based on <code>_elementor_edit_mode<\/code><\/li>\n<\/ul>\n\n<h4>1.0<\/h4>\n\n<ul>\n<li>Initial release with automatic HTML cleanup on post save<\/li>\n<li>Handles Elementor text widgets and classic content<\/li>\n<li>Includes a bulk processor with progress bar<\/li>\n<\/ul>","raw_excerpt":"Strips pasted-in junk HTML (inline styles, spans, stray attributes) from posts, Elementor widgets and ACF fields on save, or in bulk.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/368658","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=368658"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/dovidev"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=368658"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=368658"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=368658"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=368658"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=368658"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=368658"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}