Is This Content Helpful?
We're glad to know this article was helpful.
Creating a New Hosted Feature Layer from My Content using the option for From URL fails and results in the following error. This error is typically seen when entering the URL of a feature service that has been published from ArcGIS Pro.
Error: Service contains unsafe html content - [Description].
This error occurs if text has been entered in the Description field of the Metadata tab within the Map or Layer properties in ArcGIS Pro when the feature service is published to ArcGIS Online. During the publishing process, inline HTML elements are added to the Description text and stored in the JSON of the feature service. This syntax can be seen through the JSON view of the REST endpoint, after the service has been published. This example below shows how the Description is altered during the publishing process:
\u003cDIV STYLE=\"text-align:Left;font-size:12pt\"\u003e\u003cDIV\u003e\u003cDIV\u003e\u003cP\u003e\u003cSPAN\Description of the feature service...\
Note: To view the REST endpoint of a service in JSON format, browse to the REST endpoint and click 'JSON' at the top of the page.The following workflows for publishing from ArcGIS Pro show this error:
As a workaround, remove the text from the Description field in ArcGIS Pro before publishing the map or layer to ArcGIS Online. Instead, add the Description in the Item Details page of the published service in ArcGIS Online.
To access the Description in ArcGIS Pro, right-click the map or layer in the Contents pane, and select Properties. When the Layer Properties window displays, select Metadata.