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

Tags in ticket exports #14476

Open
2 tasks done
Tartiflette-glpi opened this issue Apr 3, 2023 · 5 comments
Open
2 tasks done

Tags in ticket exports #14476

Tartiflette-glpi opened this issue Apr 3, 2023 · 5 comments

Comments

@Tartiflette-glpi
Copy link

Tartiflette-glpi commented Apr 3, 2023

Code of Conduct

  • I agree to follow this project's Code of Conduct

Is there an existing issue for this?

  • I have searched the existing issues

Version

10.0.6

Bug description

Hi,
We have a problem with ticket exports. We make monthly exports in GLPI and we can find some <br> and <hr> in (tasks & time).

Can you please help us ?

Thank you

Relevant log output

No response

Page URL

No response

Steps To reproduce

With GLPI 10.0.6
Export tickets with more than 1 task

Your GLPI setup information

Informations sur le système, l'installation et la configuration
GLPI 10.0.6 (/glpi => /var/www/glpi)
Installation mode: TARBALL
Current language:fr_FR

Anything else?

No response

@cedric-anne
Copy link
Member

Hi,

You have 2 distinct problems here, please split them in 2 distinct Gihub issues to prevent subjects to be mixed up.

@Tartiflette-glpi
Copy link
Author

Hi,
Sorry, I edited & created a 2nd Github issue

@cedric-anne
Copy link
Member

What format do you use for export?

@Tartiflette-glpi
Copy link
Author

Tartiflette-glpi commented Apr 3, 2023

We do export in .csv for Excel

@cedric-anne
Copy link
Member

<hr> and <br> separators are used by this piece of code:

glpi/src/Search.php

Lines 8558 to 8563 in db834e6

case self::CSV_OUTPUT: //csv
$value = DataExport::normalizeValueForTextExport($value);
$value = preg_replace('/' . self::LBBR . '/', '<br>', $value);
$value = preg_replace('/' . self::LBHR . '/', '<hr>', $value);
$out = "\"" . self::csv_clean($value) . "\"" . $_SESSION["glpicsv_delimiter"];
break;

On SYLK and CSV format, it does not make sense, but as it is done like this since, at least, GLPI 0.85, there are probably many scripts in the wild that are handling these separators.
We cannot change it in a bugfixes version and will have to wait for GLPI 10.1.0, but you can easilly patch your own GLPI instance if you want.

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