fix bug for caret dropdown in sensor index

special characters caused html ids to be illegal for javascript