Welcome to the "trac"-ing site of soap4r!
[soap4r] [httpclient] [openpgp4u] [pkcs1] [logger] [csv] [vtr]

Ticket #416 (closed defect: fixed)

Opened 9 months ago

Last modified 9 months ago

a value of XML attribute is not properly encoded

Reported by: nahi Assigned to: nahi
Priority: highest Milestone: 1.5.8
Component: soap4r Version: 1.5
Keywords: Cc:

Description

from soap4r-ml by Leoš Bitto;

However, as a curious guy I have tried to enter some XML-
unfriendly characters there:

entry1=ExtraInfo_::Entry_.new('value1<>')
entry1.xmlattr_Key = 'key1<>'
entry2=ExtraInfo_::Entry_.new('value1<>')
entry2.xmlattr_Key = 'key2<>'
extra_info=ExtraInfo_.new([entry1,entry2])

and this was the result:

            <n4:ExtraInfo>
              <n4:Entry Key="key1<>">value1<></n4:Entry>
              <n4:Entry Key="key2<>">value1<></n4:Entry>
            </n4:ExtraInfo>

Obviously, the XML encoding is missing there. Is there any trick how
SOAP4R could do the XML encoding for me? I mean replacing < with &lt;, > with &gt; and so on.

Change History

09/09/07 10:55:01 changed by nahi

  • summary changed from a value of XML attribute is not properly encoded. Please use the attached patch to a value of XML attribute is not properly encoded.

09/09/07 15:09:40 changed by nahi

  • status changed from new to closed.
  • resolution set to fixed.

(In [1945]) * a value of XML attribute was not properly encoded. users who did XML-encode a value in SOAPElement#extraattr should care about this change (not needed from now.) closes #416.