Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-18317

ezscript, with default compress drops some js code

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: 4.5.0
    • Fix Version/s: None
    • Labels:
      None

      Description

      I've put

      {ezscript_require('jslint.js'}

      with jslint.js from:
      https://github.com/douglascrockford/JSLint/blob/master/jslint.js

      But ezscript has dropped some js code from jslint.js, after the default cleaning process.
      Here is some js code in jslint.js:

      [...]
                                  source_row = '';
                                  break;
      
      //      /* comment
      [...]
      loop:   for (;;) {
                  for (;;) {
                      if (next_token.id === '*/') {
                          break loop;
                      }
      [...]
      

      and as a result, ezscript has dropped everything betwen /* and */ without checking the validity as really starter and finisher of a comment
      Resulting cleaned code by ezscript is then (wrong code):

      [...]
                                  source_row = '';
                                  break;
      
      [here is the part of code dropped]
      
                          break loop;
                      }
      [...]
      

      Yes I know it's a bug hard to correct, I just report this problem as it may occur...

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                andre1 André R
                Reporter:
                enzo Jerome Despatis
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: