Loading ...
Sorry, an error occurred while loading the content.

Is escape non-standard in browsers or just missing in JSLint?

Expand Messages
  • christian.wirkus
    /*jslint browser: true */ escape( xyz ); Error: Implied global: escape 2
    Message 1 of 3 , Sep 7 9:51 AM
    • 0 Attachment
      /*jslint browser: true */
      escape("xyz");

      Error:
      Implied global: escape 2
    • douglascrockford
      ... The global escape function is not a creature of the browser. It was a creature of JavaScript, but was deprecated because it produces incorrect results for
      Message 2 of 3 , Sep 7 10:04 AM
      • 0 Attachment
        --- In jslint_com@yahoogroups.com, "christian.wirkus" <christian.wirkus@...> wrote:
        >
        > /*jslint browser: true */
        > escape("xyz");
        >
        > Error:
        > Implied global: escape 2

        The global escape function is not a creature of the browser. It was a creature of JavaScript, but was deprecated because it produces incorrect results for non-ASCII characters. You should use encodeURI or encodeURIComponent instead.
      • christian.wirkus
        ... Oh, thanks.
        Message 3 of 3 , Sep 8 5:31 AM
        • 0 Attachment
          --- In jslint_com@yahoogroups.com, "douglascrockford" <douglas@...> wrote:
          >
          > --- In jslint_com@yahoogroups.com, "christian.wirkus" <christian.wirkus@> wrote:
          > >
          > > /*jslint browser: true */
          > > escape("xyz");
          > >
          > > Error:
          > > Implied global: escape 2
          >
          > The global escape function is not a creature of the browser. It was a creature of JavaScript, but was deprecated because it produces incorrect results for non-ASCII characters. You should use encodeURI or encodeURIComponent instead.
          >

          Oh, thanks.
        Your message has been successfully submitted and would be delivered to recipients shortly.