Details

    • Bug Priority:
      Category 3
    • Story Points:
      3
    • Template:

      Description

      site-links dashlet (site-links.get.*)

      Cannot produce proper links for relative links starting with slash

      This line in site-links.get.html.ftl should be changed:

      <a <#if !link.internal>target="_blank"</#if> href="<#if link.url?substring(0,1) == "/" || link.url?index_of("://") == -1>http://</#if>${link.url?html}" class="theme-color-1">${link.title?html}</a>

      to

      <a <#if !link.internal>target="_blank"</#if> href="<#if link.url?substring(0,1) != "/" && link.url?index_of("://") == -1>http://</#if>${link.url?html}" class="theme-color-1">${link.title?html}</a>

      This way the behaviour is similar to linksview.js impl.
      // Prepare url attribute
      var href = (data.url.substring(0, 1) === "/" || data.url.indexOf("://") !== -1 ? '' : "http://") + data.url.replace(/"/g, encodeURIComponent('"'));

        Attachments

          Structure

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                kroast Kevin Roast [X] (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 4 hours, 30 minutes
                  4h 30m

                    Structure Helper Panel