def quote_code(self, key):
        """Returns string quoted code """

        code = self.grid.code_array(key)
        quoted_code = quote(code)

        if quoted_code is not None:
            self.set_code(key, quoted_code)