PublicDataWorks / complaint-manager

Apache License 2.0
5 stars 0 forks source link

Extra text in Narrative Details when exporting cases #657

Open christina-luong opened 4 months ago

christina-luong commented 4 months ago

Describe the bug

NO has reported extra text while exporting: "After review, it seems the "narrative details" section in the exported excel document includes code in it such as "

Date filed with OIPM: 05/01/2024<'/p><'p>PIB Case Number: 2024-0242-N<'/p><'p><'br><'/p><'p><'strong><'u>Complainant Information<'/u><'/strong><'/p><'p>" would it be possible to delete the code or only include the text entered into the "Narrative Details" text block?"

Steps to reproduce

List any steps to reproduce behavior

  1. Add text to Narrative Details.
  2. Use any of the formatting options on that text (and add new lines).
  3. Save and view the exported case information.

Expected behavior

There should only be plaintext in the exported report.

Checklist

Additional context

andrew-rist-tw commented 4 months ago

https://www.postgresqltutorial.com/postgresql-string-functions/regexp_replace/

Try using REGEXP_REPLACE in exportCasesQuery.js

hanikatw commented 4 months ago

When the exported file is opened , couple of observations

Image Image