NetLogo/NetLogo-Headless — pull request #28 by mrerrormessage (2014-12-15 22:28:06+00:00)
Title: Widget characters should not be escaped in their internal representation

#19 is back and badder than ever. Looks like quotes around strings are being escaped in internal representations of widget code. So, a monitor with the reporter `"foo"` will have its source represented as `"\\\"foo\\\""` instead of `"\"foo\""`. Same goes for buttons. Didn't seem like any other widgets were affected. The only other widgets that has actual code associated with it are plot pens, and they do not suffer from the problem. Also, `display` strings don't suffer from the problem. Here's a model:

https://gist.github.com/qiemem/0415f8ccfb96e2e224e4

The fix is to just unescape things when they're read in from the file, so that the widget case classes end up with unescaped versions. Right now, these strings are written to nlogo files escaped, which doesn't really make sense, but needs to stay that way for backwards compatibility.

It contains a monitor and button showing the problem and a plot not showing the problem. I'm like 10,000% sure this is the cause of NetLogo/Galapagos#187.