Uploaded image for project: 'MyFaces Core'
  1. MyFaces Core
  2. MYFACES-505

Use writeComment() instead of write() for <script>

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 1.1.1
    • General
    • None
    • ALL

    Description

      For creating in-page scripts, MyFaces implementation use RsponceWriter.write() method with "<!-- " and "-->" strings. It not important in HTML_BASIC , but may produce troubles for creating XHTML output in future ( in most cases, all correct writed components can produce valid XHTML. ). For such reasons, more correct will be use ResponseWriter.writeComment method for scripts & styles. In implementation, single place for in-page script prodution - renderClearHiddenCommandFormParamsFunction in HtmlRendererUtils.
      attached patch replace write to writeComment for this function.
      Also, in Tomahawk components have many places for commented scripts & styles.

      Attachments

        1. HtmlRendererUtils.patch
          3 kB
          Alexandr Smirnov

        Activity

          People

            mmarinschek Martin Marinschek
            alexsmirnov Alexandr Smirnov
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: