| @@ -900,12 +900,9 @@ | ||
| 900 | 900 | |
| 901 | 901 | // Add image entries if provided |
| 902 | 902 | foreach ($images as $image) { |
| 903 | 903 | $xml .= " <image:image>\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"; | |
| 904 | + $xml .= " <image:loc>" . esc_url(Url_Scheme::apply((string) $image['url'])) . "</image:loc>\n"; | |
| 908 | 905 | |
| 909 | 906 | if (!empty($image['title'])) { |
| 910 | 907 | $xml .= " <image:title>" . esc_html($image['title']) . "</image:title>\n"; |
| 911 | 908 | } |
| @@ -1353,9 +1350,9 @@ | ||
| 1353 | 1350 | if (preg_match('/src=["\']([^"\']+)["\']/', $img_tag, $src_match)) { |
| 1354 | 1351 | $image_url = $src_match[1]; |
| 1355 | 1352 | |
| 1356 | 1353 | // Skip if not a valid URL or external image |
| 1357 | - if (!\ThinkRank\Core\Url_Validator::is_valid($image_url)) { | |
| 1354 | + if (!filter_var($image_url, FILTER_VALIDATE_URL)) { | |
| 1358 | 1355 | continue; |
| 1359 | 1356 | } |
| 1360 | 1357 | |
| 1361 | 1358 | // Extract title and alt attributes |