Text elements containing HTML show up in the Kentico Cloud UI formatted when imported by the CM API

aweigoldaweigold Member ✭✭
edited December 2017 in Back-end Development


I noticed a strange side effect with the CM API (I know it's still Beta, just wanted to report the issue). We have a content type called "raw_html" to deal with some pages that we haven't yet migrated to our new content structure. The content type just contains a single text element. After uploading them via the CM API, when viewing them via the Kentico Cloud UI, the formatting is shown in the text field instead of the raw string. The expected contents are returned when viewing the item via the preview API, so it only seems to affect the UI. To test if this was an issue with all content items, I manually created one via the UI, with the same string, and the formatting is never shown in the UI (just the raw html as expected).

Here is a sample string '<p style="text-align: center;"><i>We also call this "Workers' Compensation."</i></p>\n'

I won't post my preview api key here, but if you want to see an example:
projectid: 0542d611-b6d8-4320-a4f4-35ac5cbf43a6
codename of imported item: _l_alabama_business_insurance_text_1342084647
codename of manually entered item: test_adam



Sign In or Register to comment.