ID:1936045
 
Resolved
XML output by the dm.exe -o option was invalid.
  • It did not contain an ?xml header.
  • There was no root element.
  • Some HTML was not properly escaped.
  • Characters normally escaped in DM (quotes, backslashes) were doubly escaped.
  • Lists did not output anything.
  • Associative lists output only the associated values, and a spurious /var tag for each.
Applies to:Dream Maker
Status: Resolved (509.1300)

This issue has been resolved.
With ./dm or dm.exe, using -o to output an object tree outputs invalid xml:
Here have an instance of unescaped HTML:
http://pastebin.com/3Q4q3eDN
Have an instance of mysterious closing tags: (how is this even happening?)
http://pastebin.com/Az8Tmyac
An instance of overescaped quotes:(that shouldn't even be escaped in the first place)
"Circuit Crate (\\\"Ripley\\\" APLU)"

An instance of unescaped ampersands:
"Rest & Spaceacillin"
Ctrl+F output from a tgstation build and you'll find all of these.

It would be nice if it outputted JSON instead or as an option, but for now I think outputting valid XML should be a priority.
Lummox JR resolved issue with message:
XML output by the dm.exe -o option was invalid.
  • It did not contain an ?xml header.
  • There was no root element.
  • Some HTML was not properly escaped.
  • Characters normally escaped in DM (quotes, backslashes) were doubly escaped.
  • Lists did not output anything.
  • Associative lists output only the associated values, and a spurious /var tag for each.
Sick, thanks!
There's still issues with associative lists, and variables prefixed with a forward-slash:

var/list/test = list("[1 + 1]" = "2")

/var/list/test2 = list(1, 2, 3)


/* becomes:
<?xml * ?>
<dm>
<var file=*>test
<val file=*>
<list>list
<val file=*>"2"</val>
</item>
</list>
</val>
</var>

*/


The syntax highlighter on the forums doesn't want to play nice with shared name on the xml tag either.
The "[]" case was mentioned in a new thread, and that issue has been closed. I don't know however if 1+1 will be handled properly or not. The object tree generation doesn't really handle most expressions and shouldn't be expected to.

The leading slash thing is a new one on me, but it should have its own thread.