View Issue Details

This bug affects 1 person(s).
 12
IDProjectCategoryView StatusLast Update
15539Bug reportsImport/Exportpublic2021-03-08 12:29
ReporterApouxx Assigned Togabrieljenik  
PrioritynormalSeverityblock 
Status closedResolutionfixed 
Product Version3.25.11 
Summary15539: queXML PDF shows JS script
Description

The queXML PDF format shows the embedded JS script at the exported file.

Link to survey : https://survey.devformation.fr/index.php/599988?lang=fr

TagsNo tags attached.
Attached Files
Bug heat12
Complete LimeSurvey version number (& build)3.25.11
I will donate to the project if issue is resolvedNo
Browsernot relevant
Database type & versionnot relevant
Server OS (if known)not relevant
Webserver software & version (if known)not relevant
PHP Versionnot relevant

Users monitoring this issue

There are no users monitoring this issue.

Activities

DenisChenu

DenisChenu

2019-11-06 12:02

developer   ~54423

In my opinion : no need «Signature question with OfflineSurvey», just add

<script>
// This must be hidden in all print part
</script>
Apouxx

Apouxx

2019-11-06 14:12

reporter   ~54427

Last edited: 2020-12-28 18:51

Sorry i dont understand... Where do i have to add this ?

Apouxx

Apouxx

2019-11-06 14:14

reporter   ~54428

Last edited: 2020-12-28 18:51

Je dois ajouter script entre qui et quoi ?

DenisChenu

DenisChenu

2019-11-06 14:54

developer   ~54430

Last edited: 2020-12-28 18:51

No, i mean : the issue is not related to OfflineSurvey
Seems related to HTML not filtered

See the attache survey + queXML

DenisChenu

DenisChenu

2019-11-06 14:55

developer   ~54431

Last edited: 2020-12-28 18:51

Framadrop link
Up to 4 Mo for a pdf 8=|
Expiration : vendredi 6 décembre 2019 14:55

https://framadrop.org/r/z50lIFF5ZB#7TqWDkG4HosZgKlRVFgfYKJeH2CIS3UKjxF9fcVJEuY=

Apouxx

Apouxx

2019-11-06 15:26

reporter   ~54432

Last edited: 2020-12-28 18:51

Ah I see... So what is the solution to export the photo and not the script itself ?

I tried with the HTML or PDF export, it shows what's in the database such as : "[{"title":"","comment":"","filename"...etc..."}] !

The problem occurs as well in the answers recap ON LS when i try to download the photo "Sorry, this file has not been found."

Mazi

Mazi

2019-11-07 08:06

updater   ~54453

Last edited: 2020-12-28 18:51

Apouxx, we are talking about two different issues here:

  1. The queXML export shows included JavaScript -> it should be filtered. This has to be fixed within Limesurvey.

  2. Uploaded files from OfflineSurveys may not be linked at the response overview properly. Question is: Did you also enter FTP connection details at OfflineSurveys so the file gets transferred from your Android device?
    If so, please get in touch with support@offlinesurveys.com so they can have a look at what goes wrong. They may need to have a look at your system so please provide credentials when emailing them.

Apouxx

Apouxx

2019-11-07 09:00

reporter   ~54454

Last edited: 2020-12-28 18:51

Hi Mazi,

I've contacted the "support@offlinesurveys.com" yesterday, still waiting for a response from them !

Apouxx

Apouxx

2019-11-07 09:29

reporter   ~54455

Last edited: 2020-12-28 18:51

I think the Upload files from OfflineSurveys is the problem :

1.The files are stocked directly in /surveyid/files/, aren't they supposed to be in /upload/surveys/surveyid/files ?

  1. They are saved without any extension, just a random file without png behind....
image.png (8,817 bytes)   
image.png (8,817 bytes)   
image-2.png (8,628 bytes)   
image-2.png (8,628 bytes)   
Mazi

Mazi

2019-11-07 11:11

updater   ~54458

Last edited: 2020-12-28 18:51

@1: Yes, they should be within the /upload/ folder. Please check if your FTP account maybe points to the wrong location.

@2: If I remember correctly, that is intended for security reasons so you can grab a file from the outside by e.g. guessing a file name. Limesurvey usually maps those cryptic file names with the real names internally.

Apouxx

Apouxx

2019-11-07 16:00

reporter   ~54466

Last edited: 2020-12-28 18:51

Was that for the folder problem mazi, i change the root file location and i goes all good, but still cant find how to export those photos as pdf or even html... still i dont understand why the photo isnt stocked in the database.. at it's place there's [{"title":"","comment":"","filename"...etc..."}] i guess it allows the LS interface to read it... but cant read it when exporting it !

Any ideas ? still waiting for a response of offlineSurvey's support.

Apouxx

Apouxx

2019-11-12 10:58

reporter   ~54535

Last edited: 2020-12-28 18:51

https://survey.devformation.fr/index.php/521936?lang=fr

Easier to test then the first one... still cant find a solution

Mazi

Mazi

2019-11-12 11:08

updater   ~54536

Last edited: 2020-12-28 18:51

The upload question type used for storing photos can't embed files at any of the export formats since you never know what format an uploaded file may have (png, txt, pdf, ...).
That's why you can download the uploaded files at the response overview screen of Limesurvey.

Apouxx

Apouxx

2019-11-12 11:14

reporter   ~54537

Last edited: 2020-12-28 18:51

I see, that was the point of all this but if u say it's not possible...

The question i was asking myself now is "How can i know easily which photo is attached to which response ?"

Not easy, if not by doing it manually on each answer, I can't see any other way of doing it... It this way can take quite a long time if we have like 100 responses !

Am i right ?

Mazi

Mazi

2019-11-12 11:20

updater   ~54538

Last edited: 2020-12-28 18:51

What would be your preferred solution? Maybe you can outline 2-3 approaches that could work for you?

Apouxx

Apouxx

2019-11-12 11:28

reporter   ~54539

Last edited: 2020-12-28 18:51

I'm watching at : https://manual.limesurvey.org/Development_-_File_Upload_question_type

make sure to identify easily a photo attached to a specific response :

As an example :

1 person is filling out the survey : He signs his answer with the signature question and sends it.
Maybe do something like put his name or something in the name's photo ? So when i export the zip with all the photo's responses, i can easily identify which signature is his .

Do you follow what i'm trying to say ?

I dont rly know how to do this, but maybe changing the way the photo's name is built ?

DenisChenu

DenisChenu

2019-11-12 11:46

developer   ~54540

Last edited: 2020-12-28 18:51

@Mazi : maybe signature must be set to a long text question ?
It's the reason why i use a long text question for https://gitlab.com/SondagesPro/ExportAndStats/generateGraphQuestion
In 4.X : you can create your own ExpressionManager function : displayUploadFile(qid,index) for example :)

But : all of this is totally unrelated of this issue … plugin feature OR LimeSurfvey feature … but not an issue.

Mazi

Mazi

2019-11-12 11:59

updater   ~54541

Last edited: 2020-12-28 18:51

Apouxx, the mentioned approach won't work. Technically it is tricky and it is also a very special requirement.

Is the name stored at the meta data of the file?

The only solution I can think of is a plugin which checks all responses, grabs the uploaded file for each response and stores the image with a new file name including the name as a ZIP file you can then download.
But this needs to be coded.

Apouxx

Apouxx

2019-11-12 14:12

reporter   ~54547

Last edited: 2020-12-28 18:51

Hmm... I see. I'll try to code smthg myself then...

Mazi

Mazi

2019-11-12 14:29

updater   ~54548

Last edited: 2020-12-28 18:51

I have updated the ticket since the actual bug is the JS shown with the export file/PDF.

@cdorin, tested and confirmed, please assign.

ollehar

ollehar

2021-02-08 17:34

administrator   ~62033

Please check if this bug still exists in the latest patch release. Thank you.

DenisChenu

DenisChenu

2021-02-09 08:01

developer   ~62053

Confirm in 3.25.10 …

Please : test with included survey … a lss is here for testing and easy reproductability …

DenisChenu

DenisChenu

2021-02-09 08:06

developer   ~62054

for 3.25.11 , i create a copy after

DenisChenu

DenisChenu

2021-02-09 08:10

developer   ~62055

@ollehar : fixed in 4.4.3

ollehar

ollehar

2021-02-09 12:11

administrator   ~62063

Thanks, Denis! Do we have a fixing commit in master, or is it just incidentally working? (I tried to search in commit history, didn't find it.)

DenisChenu

DenisChenu

2021-02-09 12:12

developer   ~62064

Who know ?

ollehar

ollehar

2021-02-09 12:17

administrator   ~62065

Got it, thanks.

gabrieljenik

gabrieljenik

2021-02-17 16:33

manager   ~62317

Using htmlpurifier instead of strip tags. Strip tags kept the tags internal content.

PR: https://github.com/LimeSurvey/LimeSurvey/pull/1768

gabrieljenik

gabrieljenik

2021-02-22 11:40

manager   ~62428

Fix committed to 3.x-LTS branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=31147

lime_release_bot

lime_release_bot

2021-03-08 12:29

administrator   ~62880

Fixed in Release 3.25.16+210302

Related Changesets

LimeSurvey: 3.x-LTS b11f9911

2021-02-22 11:40:26

gabrieljenik


Committer: GitHub Details Diff
Fixed issue 15539: queXML PDF shows JS script (#1768)

Using htmlpurifier instead of strip tags. Strip tags kept the tags internal content.
Affected Issues
15539
mod - application/helpers/export_helper.php Diff File

Issue History

Date Modified Username Field Change
2019-11-06 11:14 Apouxx New Issue
2019-11-06 11:14 Apouxx File Added: Screen Shot 11-06-19 at 10.23 AM.PNG
2019-11-06 12:02 DenisChenu Note Added: 54423
2019-11-06 14:12 Apouxx Note Added: 54427
2019-11-06 14:14 Apouxx Note Added: 54428
2019-11-06 14:54 DenisChenu Note Added: 54430
2019-11-06 14:54 DenisChenu File Added: limesurvey_survey_queXmlPrintScript.lss
2019-11-06 14:55 DenisChenu Note Added: 54431
2019-11-06 15:26 Apouxx Note Added: 54432
2019-11-07 08:06 Mazi Note Added: 54453
2019-11-07 09:00 Apouxx Note Added: 54454
2019-11-07 09:29 Apouxx File Added: image.png
2019-11-07 09:29 Apouxx File Added: image-2.png
2019-11-07 09:29 Apouxx Note Added: 54455
2019-11-07 11:11 Mazi Note Added: 54458
2019-11-07 16:00 Apouxx Note Added: 54466
2019-11-12 10:58 Apouxx Note Added: 54535
2019-11-12 11:08 Mazi Note Added: 54536
2019-11-12 11:14 Apouxx Note Added: 54537
2019-11-12 11:20 Mazi Note Added: 54538
2019-11-12 11:28 Apouxx Note Added: 54539
2019-11-12 11:46 DenisChenu Note Added: 54540
2019-11-12 11:59 Mazi Note Added: 54541
2019-11-12 14:12 Apouxx Note Added: 54547
2019-11-12 14:29 Mazi Summary queXML PDF and Signature question with OfflineSurvey => queXML PDF shows JS script
2019-11-12 14:29 Mazi Description Updated
2019-11-12 14:29 Mazi Note Added: 54548
2019-11-14 21:23 cdorin Assigned To => cdorin
2019-11-14 21:23 cdorin Status new => assigned
2020-12-28 18:51 cdorin Assigned To cdorin =>
2020-12-28 18:51 cdorin Priority none => normal
2020-12-28 18:51 cdorin Status assigned => confirmed
2020-12-28 18:51 cdorin Sync to Zoho Project => |Yes|
2021-02-08 17:34 ollehar Assigned To => ollehar
2021-02-08 17:34 ollehar Status confirmed => feedback
2021-02-08 17:34 ollehar Note Added: 62033
2021-02-09 08:01 DenisChenu Note Added: 62053
2021-02-09 08:01 DenisChenu File Added: Capture d’écran du 2021-02-09 08-00-42.png
2021-02-09 08:01 DenisChenu File Added: Capture d’écran du 2021-02-09 08-00-57.png
2021-02-09 08:06 DenisChenu Product Version 4.0.0-RC6 => 3.25.11
2021-02-09 08:06 DenisChenu Complete LimeSurvey version number (& build) 4.0.0-RC6 (191022) => 3.25.11
2021-02-09 08:06 DenisChenu Browser => not relevant
2021-02-09 08:06 DenisChenu Database & DB-Version phpMyAdmin MySQL libmysql - mysqlnd 5.0.11-dev => not relevant
2021-02-09 08:06 DenisChenu Server OS (if known) => not relevant
2021-02-09 08:06 DenisChenu Webserver software & version (if known) => not relevant
2021-02-09 08:06 DenisChenu PHP Version 5.6.40-12+ubuntu18.04.1+deb.sury.org+1 => not relevant
2021-02-09 08:06 DenisChenu Note Added: 62054
2021-02-09 08:06 DenisChenu Status feedback => confirmed
2021-02-09 08:10 DenisChenu Note Added: 62055
2021-02-09 12:11 ollehar Note Added: 62063
2021-02-09 12:12 DenisChenu Note Added: 62064
2021-02-09 12:12 ollehar Severity crash => block
2021-02-09 12:12 ollehar Sync to Zoho Project Yes => |Yes|
2021-02-09 12:17 ollehar Note Added: 62065
2021-02-09 13:46 cdorin Assigned To ollehar =>
2021-02-09 13:46 cdorin Sync to Zoho Project Yes => |Yes|
2021-02-17 16:33 gabrieljenik Note Added: 62317
2021-02-22 11:40 gabrieljenik Changeset attached => LimeSurvey 3.x-LTS b11f9911
2021-02-22 11:40 gabrieljenik Note Added: 62428
2021-02-22 11:40 gabrieljenik Assigned To => gabrieljenik
2021-02-22 11:40 gabrieljenik Resolution open => fixed
2021-02-25 19:59 ollehar Status confirmed => resolved
2021-03-08 12:29 lime_release_bot Sync to Zoho Project Yes => |Yes|
2021-03-08 12:29 lime_release_bot Note Added: 62880
2021-03-08 12:29 lime_release_bot Status resolved => closed