| @@ -428,9 +428,10 @@ | ||
| 428 | 428 | $heading = trim(wp_strip_all_tags((string) ($settings['heading'] ?? ''))); |
| 429 | 429 | $schema = [ |
| 430 | 430 | '@context' => 'https://schema.org', |
| 431 | 431 | '@type' => 'HowTo', |
| 432 | - 'name' => '' !== $heading ? $heading : (string) get_the_title(), | |
| 432 | + // The fallback is get_the_title(), texturized HTML (#976). | |
| 433 | + 'name' => \ThinkRank\Core\Seo_Text::normalize_schema_name('' !== $heading ? $heading : (string) get_the_title()), | |
| 433 | 434 | 'step' => $step_entities, |
| 434 | 435 | ]; |
| 435 | 436 | |
| 436 | 437 | $description = trim(wp_strip_all_tags((string) ($settings['description'] ?? ''))); |
| @@ -445,9 +446,9 @@ | ||
| 445 | 446 | |
| 446 | 447 | $json = wp_json_encode($schema, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX_APOS | JSON_HEX_QUOT); |
| 447 | 448 | |
| 448 | 449 | if (false !== $json) { |
| 449 | - echo '<script type="application/ld+json">' . $json . '</script>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped | |
| 450 | + echo '<script type="application/ld+json" data-thinkrank="howto">' . $json . '</script>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped | |
| 450 | 451 | } |
| 451 | 452 | } |
| 452 | 453 | |
| 453 | 454 | /** |