Wicket
  1. Wicket
  2. WICKET-4942

Double slash '//' in starting url makes Url.parse output a relative Url

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 6.4.0
    • Fix Version/s: 6.7.0
    • Component/s: wicket
    • Labels:
      None

      Description

      Trying to set JQuery reference to a CDN:

      Url jqueryCDN = Url.parse("//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js");
      getJavaScriptLibrarySettings().setJQueryReference(new UrlResourceReference(jqueryCDN));

      Url added in head results in:
      <script type="text/javascript" src=".//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>

        Issue Links

          Activity

          Hide
          Martin Grigorov added a comment -

          UrlResourceReference has been improved to render its url as is. it wont be recalculated against the base url (the currently rendered page url).

          Show
          Martin Grigorov added a comment - UrlResourceReference has been improved to render its url as is. it wont be recalculated against the base url (the currently rendered page url).
          Hide
          Jeremy Levy added a comment -

          This is very annoying for anyone who uses SSL on their site. Chome and other browsers will block access to external resources if the main page is loaded over HTTPS and it attempts to load a script via HTTP.

          Show
          Jeremy Levy added a comment - This is very annoying for anyone who uses SSL on their site. Chome and other browsers will block access to external resources if the main page is loaded over HTTPS and it attempts to load a script via HTTP.

            People

            • Assignee:
              Martin Grigorov
              Reporter:
              Serban Balamaci
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development