Httpie: Fix XML formatter

Created on 28 Feb 2016  ·  1Comment  ·  Source: httpie/httpie

Issues

The existing implementation of XML formatting suffers from multiple issues:

  • [ ] Namespaces get messed up #389
  • [ ] Processing instructions get lost #415
  • [ ] Potentionaly vulnerable #384
  • [ ] Comments get lost
  • [ ] Doctype gets lost

Possible Solutions

  1. Find/implement a robust XML formatter
  2. Remove XML formatting all together #394
  3. Only format simple XML without comments, processing instructions, doctype, and namespaces.

    Example

Before:

<?pi data?>
<!-- comment -->
<root xmlns='namespace'>
   <element key='value'>text</element>
   <element>text</element>tail
   <empty-element/>
</root>

After:

<ns0:root xmlns:ns0="namespace">
    <ns0:element key="value">text</ns0:element>
    <ns0:element>text</ns0:element>tail
   <ns0:empty-element />
</ns0:root>
bug

>All comments

Removed the XML formatter for now.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghost picture ghost  ·  5Comments

filipesperandio picture filipesperandio  ·  3Comments

jclem picture jclem  ·  6Comments

eliangcs picture eliangcs  ·  5Comments

pyvotal-cguers picture pyvotal-cguers  ·  5Comments