AnsweredAssumed Answered

Invalid html content in json request body

Question asked by edienske on Oct 29, 2015
Latest reply on Mar 26, 2020 by JerrySimmons

Hi all,


I have a peculiar problem with posting data via the /applyEdits rest endpoint to a service in ArcGIS Online.


The feature contains a string attribute "LOG_OPM" which contains the following text:


"kast 1 richting 2 3 A Groen <dub ov> vervangen nacht"

(double quotes added for clarity)


When posting this as an update through the applyEdits endpoint, the following error is returned:

Field LOG_OPM has invalid html content


Obviously this is not meant to be HTML but the parser thinks it is.


Escaping the < and > like this:

"kast 1 richting 2 3 A Groen \u003cdub ov\u003e vervangen nacht"

results in the same error.


How should I escape or encode this string so that the parser stores it properly without thinking it's invalid HTML?

This is part of a C# application, I should add.


Thanks in advance,