Uploaded image for project: 'Santuario'
  1. Santuario
  2. SANTUARIO-284

ElementProxy#getTextFromChildElement() doesn't get all of the text if the element contains an entity like &

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Java 1.4.4
    • Java 1.4.6, Java 1.5
    • Java
    • Security Level: Public (Public issues, viewable by everyone)
    • None
    • Using Apache CXF under Linux.

    Description

      I have a SOAP message that is signed with a cert that has an ampersand in the IssuerName. ElementProxy#getTextFromChildElement() returns only the text before the &

      See: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/ElementProxy.java?view=markup#l372

      If this code were changed to:

      public String getTextFromChildElement(String localname, String namespace)

      { return XMLUtils.selectNode( this._constructionElement.getFirstChild(), namespace, localname, 0).getTextContent(); }

      Then it would work, and it would also be simpler.

      Attachments

        1. ElementProxy.java.patch
          0.7 kB
          Jeremy Bettis
        2. santuario-284-revised.patch
          1 kB
          Colm O hEigeartaigh

        Activity

          People

            coheigea Colm O hEigeartaigh
            jbettis Jeremy Bettis
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: