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

JavaScriptStripper breaks prototype.js

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.3.2, 1.3.3
    • Fix Version/s: 1.3.5
    • Component/s: None
    • Labels:
      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

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

                Dates

                • Created:
                  Updated:
                  Resolved: