Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Booking Product imported by Booking Helper, doesn't have formatting in content #34

Open
ankitguptaindia opened this issue Feb 27, 2023 · 2 comments

Comments

@ankitguptaindia
Copy link
Member

If a booking product has content with formatting, imported version of booking product doesn't have those formatting.

Original Booking Content -

image

Imported Booking Content-

image

Steps -

  1. Create a booking product with some content in the editor
  2. Make content bold, heading, an ordered list, an unordered list, etc
  3. Export the product with the help of Booking Helper
  4. Import that product again and check the content of the booking.

Not sure if this scenario is considered or not at the time of designing this plugin. Feel free to close this issue if this is intentional.

@ankitguptaindia
Copy link
Member Author

ankitguptaindia commented Feb 27, 2023

@jeffpaul As discussed on 1:1, I added this case here for discussion/fix

cc: @vikrampm1

@faisal-alvi
Copy link
Member

Thanks for the report, @ankitguptaindia.

There seems to be an issue with the use of sanitize_text_field on the content before importing, as seen in this line of code:

'post_content' => sanitize_text_field( $product['product']['post_content'] ),

A possible solution would be to use wp_kses_post instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants