Sanitize size attribute