Tapestry 5
  1. Tapestry 5
  2. TAP5-407

DocumentLinker should not use the deprecated practice of HTML commenting out the <script> block

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.1.0.0, 5.1, 5.0.15, 5.0.16, 5.0.17, 5.0.18
    • Fix Version/s: 5.1.0.0
    • Component/s: tapestry-core
    • Labels:
      None

      Description

      The DocumentLinker is not commenting the javascript block properly. It needs to open with "<Unable to render embedded object: File (-- //" instead of just "<) not found.--". (patch attached)

      even a wiki on tapestry shows how to use the javascript comments properly, and says to please pay attention to how they are done...

      http://wiki.apache.org/tapestry/Tapestry5HowToIncludeJavaScript

      1. doc-js.diff
        0.7 kB
        Fernando Padilla

        Activity

        Hide
        Fernando Padilla added a comment -

        easy line liner.

        Show
        Fernando Padilla added a comment - easy line liner.
        Hide
        Howard M. Lewis Ship added a comment -

        Question: why is it relevant whether the JavaScript is in a comment block or not? That was important 5+ years ago before browsers universally supports the <script> tag.

        Show
        Howard M. Lewis Ship added a comment - Question: why is it relevant whether the JavaScript is in a comment block or not? That was important 5+ years ago before browsers universally supports the <script> tag.
        Hide
        Fernando Padilla added a comment -

        I was just correcting the proper way to comment out the javascript..

        So you can either accept this patch, or create another one to remove the current attempt at commenting out the javascript, and leave it bare. that should be good too.

        Show
        Fernando Padilla added a comment - I was just correcting the proper way to comment out the javascript.. So you can either accept this patch, or create another one to remove the current attempt at commenting out the javascript, and leave it bare. that should be good too.
        Hide
        Howard M. Lewis Ship added a comment -

        As per Douglas Crockford, http://javascript.crockford.com/script.html, this practice should now be avoided entirely.

        Show
        Howard M. Lewis Ship added a comment - As per Douglas Crockford, http://javascript.crockford.com/script.html , this practice should now be avoided entirely.

          People

          • Assignee:
            Howard M. Lewis Ship
            Reporter:
            Fernando Padilla
          • Votes:
            2 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development