Fix self-xss issue in contact-group-rename

This change fixes #5031.

You may want to look for similar issues using `git grep ').html('`.