($value)
| 764 | } |
| 765 | |
| 766 | private static function sanitizeMetaDescription($value): string |
| 767 | { |
| 768 | $text = trim((string)$value); |
| 769 | if ($text === '') { |
| 770 | return ''; |
| 771 | } |
| 772 | $text = preg_replace('/[\x00-\x1F\x7F]/', ' ', $text); |
| 773 | $text = preg_replace('/\s+/', ' ', (string)$text); |
| 774 | if (strlen($text) > 320) { |
| 775 | $text = substr($text, 0, 320); |
| 776 | } |
| 777 | return trim($text); |
| 778 | } |
| 779 | |
| 780 | private static function sanitizeTagline($value): string |
| 781 | { |
no outgoing calls
no test coverage detected