1b.app
Link copied -

HTML tags not being passed when passing product fields

Good afternoon.
I receive the goods by request https://crm.ohrana.ua/api/product/get/?login=apiuser&password=-------&co...
In the "description" block, I get "A water leakage protection system kit for Ajax alarms...."
And should receive html code:
"<p style="text-align: justify;">Leak Protection Kit ...."
This was previously fixed for my box, but apparently frayed.
Even though there are closing tags...
If the field has an HTML team, then it must be passed via api in the same way with formatting. Otherwise, the meaning of HTML is lost. I think this needs to be fixed for everyone.
Original question is available on version: ru

Answers:

Hello, we can enable a setting on the server so that in such API requests the description is always transmitted with tags.
As an alternative, for example, if you do not always need to pass tags in the description, you can make a parameter in the request responsible for enabling this setting only for the current request - 1 hour
Which option do you prefer?
27.04.2021, 11:04
Original comment available on version: ru

If the field is of type HTML, then it must always be passed with tags. Please enable the setting on the server. But I repeat, earlier this setting was already turned on and it flew off
27.04.2021, 12:14
Original comment available on version: ru

Enabled the setting on the server, can you check the transfer of tags in the description?
29.04.2021, 12:35
Original comment available on version: ru

Thank you. I will check
29.04.2021, 22:18
Original comment available on version: ru

Good afternoon. There is a remark.
I give an example
Product https://crm.ohrana.ua/admin/shop/products/2188/edit/#done
Field Description: <p style="text-align: left;"><span>111</span></p>......
By API request https://crm.ohrana.ua/api/product/get/?login=хххххх&password=ххххххх&id=...
We get "description":"<p style=text-align: left;><span>111<\/span><\/p>\r\n
You can see that the style tag is passed without quotes. i.e. "text-align: left;" API is passed without quotes. According to the rules of html, there should be quotes.
18.05.2021, 13:50
Original comment available on version: ru

Good afternoon. Please take the task to work
24.05.2021, 08:58
Original comment available on version: ru


Zamogilny Dmitry wrote:
Enabled the setting on the server, can you check the transfer of tags in the description?

Dimitri, please reply.
25.05.2021, 13:41
Original comment available on version: ru

updated the logic, now double quotes in the description in this request will be replaced with single quotes to avoid conflicts when displaying html code
25.05.2021, 17:13
Original comment available on version: ru

Thanks, I'm checking
25.05.2021, 18:03
Original comment available on version: ru

Nothing changed
<p style=text-align: left;><span>111<\/span><\/p>\r\n<p style=text-align: justify;
He eats quotation marks.
26.05.2021, 10:17
Original comment available on version: ru



Zamogilny Dmitry wrote:
check now, it should work

Thanks, there are changes. Now like this:
"description":"<p style='text-align: left;'><span>111<\/span><\/p>\r\n<p style='text-align: justify;'>
Single quotes instead of double quotes. I will check if this option works. Thanks
26.05.2021, 14:50
Original comment available on version: ru

Please join the conversation. If you have something to say - please write a comment. You will need a mobile phone and an SMS code for identification to enter. Log in and comment