Added method for rand-escaping string contents.