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

2780SV: [jslint] Re: Bad HTML string?

Expand Messages
  • Jakob Kruse
    Feb 3, 2012
      Ah yes. Thanks Harry.

      Obviously the error is partly mine. The “Bad HTML string” error seems to be caused by an internal JSLint error on an earlier run. If you check this piece of HTML first (web interface is fine), then check the JavaScript piece again, you should see the error:

      <html>
      <head>
      <script type="text/javascript">
      /*jslint sloppy: true, on: true */
      </script>
      </head>
      <body onselectstart="return false;">
      </body>
      </html>

      The error seems to be in JSLints indentation check of the “onselectstart” attribute.

      /Jakob

      Fra: jslint_com@yahoogroups.com [mailto:jslint_com@yahoogroups.com] På vegne af Merlin
      Sendt: 3. februar 2012 12:50
      Til: jslint_com@yahoogroups.com
      Emne: [jslint] Re: Bad HTML string?


      --- In jslint_com@yahoogroups.com, "Jakob Kruse" <kruse@...> wrote:
      > If I run the following code (properly indented) through JSLint at jslint.com with all options cleared, it validates. If I run the exact same code through JSLint locally, with no options, using jslint.js downloaded today from jslint.com, it errors with "Bad HTML string".
      >
      > /*jslint sloppy: true */
      > function quote(s) {
      > return '"' + s + '"';
      > }
      >
      > Any ideas as to the difference?

      I've tried linting the file t.js on both the full and minimized versions of jslint
      in Widget Tester. I'm not seeing the fault in either version.

      Using file from http://jslint.com/jslint.js:

      Welcome to Yahoo! Widgets 4.5.2x10A50 on 02/03/12 11:26:46.066
      getJSLint:Using local JSLint file. MD5 sum: 1467142763141787501a2c3f745d303f
      Widget Tester 9.4.4
      JSLint by Douglas Crockford, Edition 2012-01-26.
      Filename: t.js
      ok

      Using file from http://www.JSLint.com/minjslint.js:

      Welcome to Yahoo! Widgets 4.5.2x10A50 on 02/03/12 11:28:07.856
      getJSLint:Using today's JSLint file. MD5 sum: 73152b10706369d0c7dbea86751e12c6
      Widget Tester 9.4.4
      JSLint by Douglas Crockford, Edition 2012-01-26.
      Filename: t.js
      ok

      t.js:
      /*jslint sloppy: true */
      function quote(s) {
      return '"' + s + '"';
      }

      (Tried it with a tab and with four spaces.)

      Harry.

      [Non-text portions of this message have been removed]
    • Show all 6 messages in this topic