Using split instead of substr to get content type attribute