Select to view content in your preferred language

Special characters in title of a Portal item

618
0
12-13-2023 06:52 AM
Labels (1)
BerendVeldkamp
Frequent Contributor

I'm building a library that uploads certain items to ArcGIS Portal or ArcGIS Online using addItem

I found out that if the title contains either < or >, the title is stripped after that character. This is not just a display issue, I checked using the ArcGIS Assistant, and can confirm that the actual title of the item is modified

My first thought was that I had to escape the form parameters in the POST request, and replace < with %3C etc, but that didn't fix it.

Eventually it turned out that changing < to &lt; and > to &gt; does fix the issue, but this is strange because we are not in an HTML or XML context. 

However, this made me wonder, which other special characters do I need to escape? I'm now using the .NET method HttpUtility.HtmlEncode() which encodes &<>\

 

 

(Note, I already found out that a + in a title is completely impossible due to an almost two year old bug)

0 Kudos
0 Replies