[REST API] Unexpected HTML product description transformation

Hello,

I’m working with Shopify REST API. I’ve faced with unexpected(undocumented) Shopify API behavior. For example, when a payload has some HTML tags in the Product.body_html attribute Shopify backend changes it.

Example of payload:

This item does not ##### stand alone. It is 

compatible with other 

items in this series, sold separately.

**1f23**
62.25"W x 5.75"D x 47.38"H - 63.0 lb

**Something - Dark Brown - Hdbd/Ftbd**
77.75"W x 5.75"D x 47.38"H - 75.0 lb

Here’s the value when we fetch just posted data.

This item does not ##### stand alone. It is 

compatible with other 

items in this series, sold separately.

**1f23**
62.25"W x 5.75"D x 47.38"H - 63.0 lb

**something - Dark Brown - Hdbd/Ftbd**
77.75"W x 5.75"D x 47.38"H - 75.0 lb

Has anybody faced such issues? Do you have any ideas about what way/library/algorithm Shopify uses to transform input data?

I really appreciate any help you can provide.

Hey @TDmytro_WS

I can’t speak to the transformation process/library the API is using under the hood but in this case it’s fixing the broken HTML (closing the

before starting a new one since they can’t be nested). Are you able to validate/correct the HTML before posting?

Hey @SBD

Yep, you’re right, that’s just a simple example. I want to understand the whole scope of transformations. Shopify updates
to
as well. So, they can have a lot of rules for transformation.

To use some HTML validator I need to understand the standards that I have to configure it..