shorten arbitrary error length to avoid script injection