Uploaded image for project: 'Hippo Site Toolkit 2'
  1. Hippo Site Toolkit 2
  2. HSTTWO-3129

Async javascript load should only move script tags with type="text/javascript"

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Top
    • Resolution: Fixed
    • Affects Version/s: 2.26.13
    • Fix Version/s: 2.28.08
    • Component/s: None
    • Similar issues:
    • Sprint:
      Maintenance Sprint 1, Maintenance Sprint 2

      Description

      Currently the fixes that were done for HSTTWO-2845 will break code that uses <script> tags for anything else than execution javascript, e.g. Handlebars templates.

      We should improve the code that moves script elements and restrict it to elements with type="text/javascript" only. Note that in HTML5 the default value for the type attribute is "text/javascript" (if it is missing).

      Examples of Handlebars templates:

      <script id="entry-template" type="text/x-handlebars-template">
      Hello, <strong>firstName lastName</strong>!
      </script>

      <script type="text/x-handlebars">
      Hello, <strong>firstName lastName</strong>!
      </script>

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jsheriff Junaidh Kadhar Sheriff
                Reporter:
                abogaart Arthur Bogaart
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: