Uploaded image for project: 'logback'
  1. logback
  2. LOGBACK-728

XMLLayout does not escape &

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 1.0.6
    • None

    Description

      XMLLayout does not seem to encode '&' characters
      (it uses Transform.escapeTags which only escapes '<' and '>').
      As a result, it produces broken XML especially when properties
      are enabled and MDCInsertingServletFilter is used :

      <log4j:data name='req.queryString' value='foo=42&bar=42' />

      Attachments

        1. 0001-Escape-XML-and.patch
          2 kB
          Gabriel Corona
        2. 0002-Escape-more-things-in-XMLLayout.patch
          2 kB
          Gabriel Corona
        3. logback.xml
          0.5 kB
          Gabriel Corona
        4. test.xml
          3 kB
          Gabriel Corona
        5. TestLogback.java
          0.8 kB
          Gabriel Corona

        Activity

          People

            logback-dev Logback dev list
            corona Gabriel Corona
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: