Check if the type of contents is a composite media type
This commit is contained in:
@@ -15,6 +15,10 @@ func (o *OutOfLineContent) hasSRC() bool { return true }
|
||||
func (o *OutOfLineContent) getType() string { return string(o.Type) }
|
||||
|
||||
func (o *OutOfLineContent) Check() error {
|
||||
if isCompositeMediaType(o.getType()) {
|
||||
return errors.New("type attribute of out of line content must not be a composite type")
|
||||
}
|
||||
|
||||
if o.SRC == "" {
|
||||
return errors.New("src attribute of out of line content empty")
|
||||
}
|
||||
|
Reference in New Issue
Block a user