Page 1 of 1

Problem with XML export content

Posted: Mon Sep 01, 2014 12:56 pm
by turbo80
Script URL: -- internal server --
Version of script: 2.5.5
Hosting company:
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution: export XML

Write your message below:
Hi,

We encountered problems with the new export to XML.
The problem is the following : some users put messages with informations like :
Fichier z:\isacowt.gi\COT7C20.tmp\06438-BAL.ECR
All XML parsers convert \0 to the NULL character and generate an error.
The solution I've found is to modify the two following lines in export.php :
539 : $ticket['message'] = hesk_msgToPlain($ticket['message'], 1, 0);
540 : $ticket['subject'] = hesk_msgToPlain($ticket['subject'], 1, 0);
By adding the last parameter in the call to hesk_msgToPlain, we keep the slashes and all is right.

Hope this helps.
Regards :wink:

Re: Problem with XML export content

Posted: Mon Sep 01, 2014 1:42 pm
by Klemen
Thanks for sharing this!

Re: Problem with XML export content

Posted: Fri Feb 27, 2015 11:16 am
by turbo80
Hi Klemen,

I hoped these minor changes would be kept in future releases but that's not the case in release 2.6.x. :(

Regards,
Philippe

Re: Problem with XML export content

Posted: Fri Feb 27, 2015 11:51 am
by Klemen
Hi Philippe,

Honestly - I didn't write it down so completely forgot about it.

I made the change now on my development branch so it will be included in the next minor update.

Thanks for reminding me.

Re: Problem with XML export content

Posted: Wed Mar 18, 2015 4:49 pm
by Klemen
This fix has been included in the 2.6.2 update: viewtopic.php?f=13&t=5234