Alleged attacker stabbed, then jailed