PluginProbe
Search Atlas SEO – OTTO AI SEO Automation for WordPress / 2.7.2
Search Atlas SEO – OTTO AI SEO Automation for WordPress v2.7.2
2.7.1 2.7.2 2.7.0 2.6.26 2.6.25 2.6.24 2.6.23 2.6.22 2.6.21 2.6.20 2.6.19 2.6.18 2.6.17 2.6.16 2.6.15 2.6.14 2.6.13 2.6.12 2.6.11 2.6.10 2.6.9 2.6.8 2.6.7 2.6.6 2.6.5 All 141 releases
← All changes | includes/class-metasync-html-to-markdown.php +3 -3 2.6.22 → 2.7.2 View file →
@@ -125,9 +125,9 @@
125 125 );
126 126 $html = preg_replace_callback(
127 127 '#<pre\b[^>]*>(.*?)</pre>#is',
128 128 function ($m) {
129 - $code = html_entity_decode(strip_tags($m[1]), ENT_QUOTES | ENT_HTML5, 'UTF-8');
129 + $code = html_entity_decode(wp_strip_all_tags($m[1]), ENT_QUOTES | ENT_HTML5, 'UTF-8');
130 130 return "\n\n```\n" . trim($code) . "\n```\n\n";
131 131 },
132 132 $html
133 133 );
@@ -135,9 +135,9 @@
135 135 // Inline code.
136 136 $html = preg_replace_callback(
137 137 '#<code\b[^>]*>(.*?)</code>#is',
138 138 function ($m) {
139 - $code = html_entity_decode(strip_tags($m[1]), ENT_QUOTES | ENT_HTML5, 'UTF-8');
139 + $code = html_entity_decode(wp_strip_all_tags($m[1]), ENT_QUOTES | ENT_HTML5, 'UTF-8');
140 140 return '`' . $code . '`';
141 141 },
142 142 $html
143 143 );
@@ -290,9 +290,9 @@
290 290 // Replace block-ish containers with newlines so stripping doesn't mash content.
291 291 $html = preg_replace('#</(?:div|section|article|aside|header|footer|main|nav|figure|figcaption)>#i', "\n", $html);
292 292 $html = preg_replace('#<(?:div|section|article|aside|header|footer|main|nav|figure|figcaption)\b[^>]*>#i', '', $html);
293 293 // Strip remaining tags.
294 - return strip_tags($html);
294 + return strip_tags($html); // phpcs:ignore WordPress.WP.AlternativeFunctions.strip_tags_strip_tags -- wp_strip_all_tags() also strips script/style contents and trims; plain strip_tags() is required
295 295 }
296 296
297 297 /**
298 298 * Convert a <table> block into a pipe-style markdown table.