Here's a nice test!

During a code review, I spotted something I thought I did wrong: proper 
serialisation of encoded characters. Here's a nice test:


 element: @attribute, -content.
 attribute: -content.
 content:   +#26, +#22, +#27, +#3C, +#3E,
             #26,  #22,  #27,  #3C,  #3E.


with input


 &"'<>&"'<>


You should get output along the lines of


 <element 
attribute='&amp;"&apos;&lt;>&amp;"&apos;&lt;>'>&amp;"'&lt;>&amp;"'&lt;></element>



(To my surprise, I seem to do it right)


Steven

Received on Saturday, 20 August 2022 11:04:33 UTC