Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-1520

JavaScriptStripper breaks prototype.js

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.3.2, 1.3.3
    • 1.3.5
    • None
    • None

    Description

      JavaScriptStripper is used to strip whitespace and comments from JavaScript files if the resource settings for the application enable that behavior.

      The problem is it breaks prototype.js version 1.6.0 (a heavily used JavaScript library, used by many components like wicketstuff-scriptaculous ).
      It changes the library so that the line that reads:

      document.write("<script id=__onDOMContentLoaded defer src=//:><\/script>");

      becomes:

      document.write("<script id=__onDOMContentLoaded defer src=

      This is enough to render useless any application that relies on scriptaculous . The funny part is that it only happen if the application mode is DEPLOYMENT, as in DEVELOPMENT this code is not active.

      I suggest dropping this functionality altogether - the logic for doing the stripping is extremely complicated and what is the point of stripping whitespace and comments from something that is going to be gzip compressed anyway?

      Attachments

        Issue Links

          Activity

            People

              knopp Matej Knopp
              jjviana Juliano Viana
              Votes:
              4 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: