Note: paragraphs are created automatically depending on the context when the post is processed, so there’s no need to add these tags to your query raw input.
Ok, I see. So the only option to have a clean display when users edit their migratedHTMLposts via the API is to replace all <p> and <br> tags with \n if I understand correctly?
If you try to sanitize some imported HTML content, I suppose you can replace paragraphs with line breaks as well, so you’ll be sure there are line breaks, and the post will be processed properly.
Ok, thank you
Last question:
Is there any way you can tell me how to add a mention, like this one: @Canapin, in a post via the API? I tried using @username in the raw field, but it doesn’t work.
Honestly, I created a POC with an import script in Ruby, but since I need to synchronize data for several days between an old solution and Discourse, I prefer running a simple Python script. It’s much faster to set up and maintain. Additionally, it’s consistent, as I scrape the old data with Python. The previous provider won’t grant us access to the database, so I scraped all the content into a database.
But of course it’s a better solution if it’s a simple migration