The home secretary said the law would punish activists “insulting those who paid the ultimate price”.