Fix source check in entry

This commit is contained in:
Jason Streifling 2024-10-17 05:34:32 +02:00
parent 434783165b
commit e0902d9ba4

View File

@ -213,7 +213,7 @@ func (e *Entry) Check() error {
// is not an XML media type [RFC3023], does not begin with "text/", and // is not an XML media type [RFC3023], does not begin with "text/", and
// does not end with "/xml" or "+xml". // does not end with "/xml" or "+xml".
mediaType := e.Content.getType() mediaType := e.Content.getType()
if !isXMLMediaType(mediaType) && !strings.HasPrefix(mediaType, "text/") { if isValidMediaType(mediaType) && !isXMLMediaType(mediaType) && !strings.HasPrefix(mediaType, "text/") {
return fmt.Errorf("no summary element of entry %v but media type not xml", e.ID.URI) return fmt.Errorf("no summary element of entry %v but media type not xml", e.ID.URI)
} }
} }