Topic: [Bug/Fixed](Issue #599/600) XML Post API double encodes artists and sources.

Posted under Site Bug Reports & Feature Requests

This topic has been locked.

Bug overview description.
@Mitchfizz05: I'm not sure if this has been reported, but the XML API doesn't return artists correctly.

Bug: In the XML response for posts, the artist JSON array is converted into HTML entities twice, meaning that after decoding the HTML entities, there are still HTML entities.
Expected behavior: Raw XML: <artist>[&quot;mistydash&quot;]</artist>
Actual behavior: Raw XML: <artist>[&amp;quot;sorcerushorserus&amp;quot;]</artist>
Steps to duplicate: View source on https://e621.net/post/show/929048.xml

Edit: This also appears to be an issue with the <sources> tag also.

Edit 2: Clarified that it's actually being encoded twice.

What part(s) of the site page(s) are affected?
Post API

What is the expected behavior?
API should return single encoded list.

What actual behavior is given instead?
API double encodes list.

Time of incident. (If applicable)
N/A

Can you reproduce the bug every time?
Yes.

What steps did you take to replicated this bug?
N/A

Errors or other messages returned. (If any)
N/A

Bug confirmed. Assigned internal ID #599 and #600.

Fixed, pending deploy.

As part of this change, the artist and sources fields were converted to proper XML encoded lists to match the rest of the site. Why bring along a JSON library if you're already using XML?

<artist type="array">
  <artist>name</artist>
</artist>
<sources type="array">
  <source>source here</source>
</sources>

EDIT: Fixed in deploy of 1.1.0 on 2016-08-02.

Updated by anonymous

  • 1