Studio API seems to return invalid SXLIFF when segment has locked content.

I am passing a segment with locked content via the Translation Provider framework API. The segment in the physical SDLXLIFF looks as shown below:

Sie <x id="locked2" xid="lockTU_182ecf24-0d21-481d-85fa-1764f989ba26"/> begibt sich auf ihre <g id="1">Jungfernfahrt</g>

The API then sends the following XLIFF string as source segment:

Sie < 1 id=1 text-equiv= < token> USS Aurora</token>/> begibt sich auf ihre <g id=\"1\">Jungfernfahrt</g>.

The full JSON string that I am sending to the Web service looks as shown below:

{ "engine_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "format": "xliff: 1.2",

"sentences" : ["Sie < 1 id=1 text-equiv= < token> USS Aurora</token>/> begibt

sich auf ihre <g id=\"1\">Jungfernfahrt</g>."])

The translation returned is then messed up, probably because the SDLXLIFF passed through the API is not valid:

It &It; 1 id =1 text-equiv=&It;token&gt;USS Aurora&lt;/token&gt;/&gt; goes on her <g id="1"> maiden journey</g>.

Any idea what is happening here?