MCPcopy Create free account
hub / github.com/error311/FileRise / sanitizeMetaDescription

Method sanitizeMetaDescription

src/FileRise/Domain/AdminModel.php:766–778  ·  view source on GitHub ↗
($value)

Source from the content-addressed store, hash-verified

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 {

Callers 3

buildPublicSubsetMethod · 0.95
updateConfigMethod · 0.95
getConfigMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected