Correctly trim notifications with special characters.