#Hey guys !
1 messages · Page 1 of 1 (latest)
I've tried to add "There will be line breaks in the text, keep it in the traduction. The content that will be sent is encoded with htmlspecialchars from PHP. You must decode it before sending it back." in the prompt, but that didn't changed anything
the problem seem to be with \n present in the response of chatGPT. you probably need to strip the \n or to replace them for some html entity... I remember I helped someone solve a similar issue they had with generating an email template, they needed to encode the template as an url argument and the newlines were a pain to render correctly.
_ _
Since I don't remember from the top of my head, I did a quick search and found a stack overflow answer suggesting this:
Try to replace the
\nwith%0A
I think that's what helped with the email situation back then.
I admit I'm unsure about your actual environment and I rarely work with PHP. But perhaps that info can help you
@simple fossil (in case you didn't get notified)