Police had to use pepper spray on a De Montfort University student after he injured a female police officer trying to escape.