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

SV: [jslint] Re: Bad HTML string?

Expand Messages
  • Merlin
    ... Confirmed: In Chrome: Error: Problem at line 7 character 22: Cannot read property at of null Over to Douglas! Harry.
    Message 1 of 6 , Feb 3, 2012
    • 0 Attachment
      --- In jslint_com@yahoogroups.com, "Jakob Kruse" <kruse@...> wrote:
      > > It appears that JSLint is retaining state from one run to the next.
      > In case of internal errors, yes.
      > > The web and Widget Tester versions both fail, but not quite in the same way.

      > Actually, they fail in exactly the same way, but the error message given for this error by different JavaScript runtimes differs. Try running the web validation in Chrome for instance, and you will get a third error message.

      Confirmed:
      In Chrome:
      Error:
      Problem at line 7 character 22: Cannot read property 'at' of null

      Over to Douglas!

      Harry.
    • douglascrockford
      ... Thanks. Please try it now. And by the way, in case anyone has been reading this thread, function quote(s) { return + s + ; } is a dangerously
      Message 2 of 6 , Feb 3, 2012
      • 0 Attachment
        --- In jslint_com@yahoogroups.com, "Merlin" <g7awz@...> wrote:
        >
        > --- In jslint_com@yahoogroups.com, "Jakob Kruse" <kruse@> wrote:
        > > > It appears that JSLint is retaining state from one run to the next.
        > > In case of internal errors, yes.
        > > > The web and Widget Tester versions both fail, but not quite in the same way.
        >
        > > Actually, they fail in exactly the same way, but the error message given for this error by different JavaScript runtimes differs. Try running the web validation in Chrome for instance, and you will get a third error message.
        >
        > Confirmed:
        > In Chrome:
        > Error:
        > Problem at line 7 character 22: Cannot read property 'at' of null


        Thanks. Please try it now.

        And by the way, in case anyone has been reading this thread,

        function quote(s) {
        return '"' + s + '"';
        }

        is a dangerously insecure function. It should be removing or entityifying all '"' and '\\' in s before concatenating.
      • Jakob Kruse
        Works, thanks! And yes, don’t ever use that function or anything like it. It was a bad example. /Jakob Fra: jslint_com@yahoogroups.com
        Message 3 of 6 , Feb 3, 2012
        • 0 Attachment
          Works, thanks! And yes, don’t ever use that function or anything like it. It was a bad example.

          /Jakob

          Fra: jslint_com@yahoogroups.com [mailto:jslint_com@yahoogroups.com] På vegne af douglascrockford
          Sendt: 3. februar 2012 19:04
          Til: jslint_com@yahoogroups.com
          Emne: SV: [jslint] Re: Bad HTML string?

          --- In jslint_com@yahoogroups.com, "Merlin" <g7awz@...> wrote:
          >
          > --- In jslint_com@yahoogroups.com, "Jakob Kruse" <kruse@> wrote:
          > > > It appears that JSLint is retaining state from one run to the next.
          > > In case of internal errors, yes.
          > > > The web and Widget Tester versions both fail, but not quite in the same way.
          >
          > > Actually, they fail in exactly the same way, but the error message given for this error by different JavaScript runtimes differs. Try running the web validation in Chrome for instance, and you will get a third error message.
          >
          > Confirmed:
          > In Chrome:
          > Error:
          > Problem at line 7 character 22: Cannot read property 'at' of null

          Thanks. Please try it now.

          And by the way, in case anyone has been reading this thread,

          function quote(s) {
          return '"' + s + '"';
          }

          is a dangerously insecure function. It should be removing or entityifying all '"' and '\\' in s before concatenating.

          [Non-text portions of this message have been removed]
        Your message has been successfully submitted and would be delivered to recipients shortly.