PluginProbe
ThinkRank AI SEO – AI SEO Plugin for WordPress: Schema, XML Sitemaps, Meta Tags, Search Console & Local SEO / 2.14.2
ThinkRank AI SEO – AI SEO Plugin for WordPress: Schema, XML Sitemaps, Meta Tags, Search Console & Local SEO v2.14.2
2.14.2 2.14.1 2.14.0 2.13.0 2.12.0 2.11.0 2.10.0 2.9.0 2.8.0 2.7.0 2.6.0 2.5.0 2.4.0 2.3.0 2.2.0 2.1.1 2.1.0 2.0.2 2.0.1 2.0.0 1.32.0 1.31.0 1.30.0 1.29.0 1.28.0 All 57 releases
← All changes | includes/seo/class-sitemap-generator.php +5 -2 2.14.1 → 2.14.2 View file →
@@ -900,9 +900,12 @@
900 900
901 901 // Add image entries if provided
902 902 foreach ($images as $image) {
903 903 $xml .= " <image:image>\n";
904 - $xml .= " <image:loc>" . esc_url(Url_Scheme::apply((string) $image['url'])) . "</image:loc>\n";
904 + // The sitemap protocol wants an escaped URL, and WordPress hands back
905 + // attachment URLs with non-ASCII filenames unencoded (esc_url() does
906 + // not encode them either), so write the percent-encoded form (#924).
907 + $xml .= " <image:loc>" . esc_url(\ThinkRank\Core\Url_Validator::to_ascii(Url_Scheme::apply((string) $image['url']))) . "</image:loc>\n";
905 908
906 909 if (!empty($image['title'])) {
907 910 $xml .= " <image:title>" . esc_html($image['title']) . "</image:title>\n";
908 911 }
@@ -1350,9 +1353,9 @@
1350 1353 if (preg_match('/src=["\']([^"\']+)["\']/', $img_tag, $src_match)) {
1351 1354 $image_url = $src_match[1];
1352 1355
1353 1356 // Skip if not a valid URL or external image
1354 - if (!filter_var($image_url, FILTER_VALIDATE_URL)) {
1357 + if (!\ThinkRank\Core\Url_Validator::is_valid($image_url)) {
1355 1358 continue;
1356 1359 }
1357 1360
1358 1361 // Extract title and alt attributes