MyFaces Core
  1. MyFaces Core
  2. MYFACES-1963

<script src=""> generates extra html comments

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Duplicate
    • Affects Version/s: 1.1.3, 1.1.4, 1.1.5
    • Fix Version/s: None
    • Component/s: General
    • Labels:
      None

      Description

      When inserting a javascript source file, extra comments are added. For instance :

      <script type="text/javascript" src="test.js"><!-- --> </script>

      A way to remove these comments would be to generate comments inside write and writeText methods in org.apache.myfaces.shared.renderkit.html.HtmlResponseWriterImpl, and not in writeElement method. In this case, if no write or writeElement is issued, the unnecessary comments are not written to the output.

        Issue Links

          Activity

          Hide
          Leonardo Uribe added a comment -

          a new param was added called org.apache.myfaces.WRAP_SCRIPT_CONTENT_WITH_XML_COMMENT_TAG by default true to control this behavior and disable it when necessary.

          Show
          Leonardo Uribe added a comment - a new param was added called org.apache.myfaces.WRAP_SCRIPT_CONTENT_WITH_XML_COMMENT_TAG by default true to control this behavior and disable it when necessary.
          Hide
          Simon Kitching added a comment -

          It might be time to just get rid of these comment characters completely.

          They are only there to support browsers that are too old to recognise a <script> tag, right? I doubt very much that any such browsers are in use any more. Even simple browsers such as lynx should recognise the tag and handle it correctly, even if they ignore the content.

          Getting rid of these comments would make pages smaller and look much nicer..

          Show
          Simon Kitching added a comment - It might be time to just get rid of these comment characters completely. They are only there to support browsers that are too old to recognise a <script> tag, right? I doubt very much that any such browsers are in use any more. Even simple browsers such as lynx should recognise the tag and handle it correctly, even if they ignore the content. Getting rid of these comments would make pages smaller and look much nicer..

            People

            • Assignee:
              Leonardo Uribe
              Reporter:
              Bruno Hondelatte
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development