Project

Profile

Help

Support #5136

closed

Greater than symbol getting escaped in HTTP Post body text passed through map

Added by Gary Cornelius over 2 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Low
Assignee:
Category:
-
Sprint/Milestone:
-
Start date:
2021-10-19
Due date:
% Done:

0%

Estimated time:
Applies to JS Branch:
2
Fix Committed on JS Branch:
Fixed in JS Release:
SEF Generated with:
9.8
Platforms:
Company:
Gary Cornelius
Contact person:
Gary Cornelius
Additional contact persons:
-

Description

I am trying to HTTP post some body text that has greater than symbols from Saxon-JS in a web page and I need the symbols to stay as '>' rather than getting escaped to '&gt'. I have tried disabled-output escaping, cdata, un-parsed text, entities, character map and some other things and nothing seems to work. Is this a bug or can you advise a method to get greater than symbols in the text posted from Saxon-JS through the HTTP post map?

My use case is along these lines where I am formatting some query text to be HTTP posted...

<xsl:variable name="body">
<xsl:text>from(bucket: "TEST") 
|> range(start: -15d)
|> filter(fn: (r) =>
  r._measurement == "000000"
    and (r._field == "00001")
)</xsl:text></xsl:variable>

And then I want to post in as a scheduled task through a map

<xsl:param name="request" select="map{
  'method': 'POST',
  'href': 'https://www.rapport.net/api/test',
  'media-type': 'application/vnd.flux',
  'headers': map{
                    'accept': 'application/csv',
                    'content-type': 'application/vnd.flux' 
                },
  'body': serialize($body)
  }"/>

Many thanks in advance for any help or support with this!

Please register to edit this issue

Also available in: Atom PDF Tracking page