View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
09409 | Bug reports | Import/Export | public | 2014-12-15 14:36 | 2015-03-21 11:20 |
Reporter | yurj | Assigned To | aesteban | ||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Product Version | 2.05+ | ||||
Fixed in Version | 2.05+ | ||||
Summary | 09409: PDF export by user contains html tag | ||||
Description | Hi! when a user submit a survey and want to get the pdf version of the answers, the pdf shows the description of the questions in html (<span>this is a question, for example). The question description is created with the html editor in 2.05+, but when using formatting (span, colors, strong) the pdf report it as html tag instead of a textual (or rendered) version. | ||||
Steps To Reproduce | create a survey | ||||
Additional Information | I've searched trought the code but I'm unable to find how to fix it. | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
Bug heat | 10 | ||||
Complete LimeSurvey version number (& build) | Version 2.05+ Build 141210 | ||||
I will donate to the project if issue is resolved | No | ||||
Browser | Firefox 34.0.5 | ||||
Database type & version | mysql | ||||
Server OS (if known) | linux | ||||
Webserver software & version (if known) | apache | ||||
PHP Version | 5.4 | ||||
@aesteban : it's a child of https://github.com/LimeSurvey/LimeSurvey/commit/cb5228c0065095953438029b5bc832d3a1f16525 tcpddf can use some HTML with writeHTML (http://www.tcpdf.org/doc/code/classTCPDF.html#ac3fdf25fcd36f1dce04f92187c621407) but need:
|
|
You can use $this->delete_html for starting, but : remind to remove script too :) |
|
@aesteban : Expression manager in question text are not replaced too. |
|
Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=14741 |
|
Fixed: https://github.com/LimeSurvey/LimeSurvey/commit/d94715ba9ae43a08258b0473e86d6c722d09d41d |
|
Fix committed to 2.06 branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=14742 |
|
Thanks, great for HTML part in question : some bug at github and another here:
PS: realky great for HTML \o/ . I just think we need to filter it before (CHtmlPurifier with a lot of option) PS2: another litle issue, maybe can be fixed with HTML purifier or some baseurl : relative URL are not updated to absolute url : but this one must be in dev, not in bug. |
|
Thanks for the quick fix :-D I don't know how to apply it or if I can. Should I wait the next update? Thanks again! |
|
@DenisChenu : Thanks a lot for your comments, I'm already writing the code. I have a doubt: In my opinion, answers text from users should be managed as plain text, like in "Question 1" in you survey example. However, if we replace links in picture question as you suggest, aren't we doing contradictory things? Which would be the criteria? @yurj : If you don't want/can to wait for next release, you can take the patch from git repo with "git diff" and apply it to your code with "patch -p1" |
|
@aesteban : the problem is:
BUT : we need to know what is the question type ..... Before we allways return filtered HTML (for example <img src='png.png' alt='png picture' /> return empty string. I don't know actually how is the better way to fix it. But it's better than before. |
|
@DenisChenu : We could open another bug for questions similar to single choice (a complex issue) and for the moment return HTML tags as plain text (i.e. keep current behaviour). Is this ok for you? |
|
I think it's better to use flattenText to don't change precedent behaviour https://github.com/LimeSurvey/LimeSurvey/commit/cb5228c0065095953438029b5bc832d3a1f16525#diff-48eb7edba3e2af076bba04777db710deL159 You can open a new bug, i try to have a look :) |
|
Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=14745 |
|
Fix committed to 2.06 branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=14746 |
|
Thank you !! Do you think we can use EM in header title and text ? |
|
Version 2.05 Build 141229 released |
|
LimeSurvey: master d94715ba 2014-12-16 02:30 Details Diff |
Fixed issue 09409 : PDF export by user contains html tag |
Affected Issues 09409 |
|
mod - application/controllers/PrintanswersController.php | Diff File | ||
mod - application/libraries/admin/pdf.php | Diff File | ||
LimeSurvey: 2.06 4c18d76a 2014-12-16 02:41 Details Diff |
Fixed issue 09409 : PDF export by user contains html tag |
Affected Issues 09409 |
|
mod - application/controllers/PrintanswersController.php | Diff File | ||
mod - application/libraries/admin/pdf.php | Diff File | ||
LimeSurvey: master a48b8288 2014-12-16 18:37 Details Diff |
Fixed issue 09409 : PDF export by user contains html tag Dev : Purifying HTML code Dev : flattenText is back to answer texts Dev : Fix wrong variable aSurveyInfo |
Affected Issues 09409 |
|
mod - application/libraries/admin/pdf.php | Diff File | ||
LimeSurvey: 2.06 53e01789 2014-12-16 18:39 Details Diff |
Fixed issue 09409 : PDF export by user contains html tag Dev : Purifying HTML code Dev : flattenText is back to answer texts Dev : Fix wrong variable aSurveyInfo |
Affected Issues 09409 |
|
mod - application/libraries/admin/pdf.php | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2014-12-15 14:36 | yurj | New Issue | |
2014-12-15 15:46 | DenisChenu | Assigned To | => aesteban |
2014-12-15 15:46 | DenisChenu | Status | new => assigned |
2014-12-15 15:54 | DenisChenu | Note Added: 31253 | |
2014-12-15 16:19 | DenisChenu | File Added: limesurvey_survey_09409.lss | |
2014-12-15 16:19 | DenisChenu | Note Added: 31254 | |
2014-12-15 16:51 | DenisChenu | Note Added: 31256 | |
2014-12-16 02:31 | aesteban | Changeset attached | => LimeSurvey master d94715ba |
2014-12-16 02:31 | aesteban | Note Added: 31257 | |
2014-12-16 02:31 | aesteban | Resolution | open => fixed |
2014-12-16 02:32 | aesteban | Note Added: 31258 | |
2014-12-16 02:39 | aesteban | Status | assigned => resolved |
2014-12-16 02:39 | aesteban | Fixed in Version | => 2.05+ |
2014-12-16 02:39 | aesteban | Issue Monitored: aesteban | |
2014-12-16 02:41 | aesteban | Changeset attached | => LimeSurvey 2.06 4c18d76a |
2014-12-16 02:41 | aesteban | Note Added: 31259 | |
2014-12-16 08:56 | DenisChenu | Note Added: 31262 | |
2014-12-16 08:56 | DenisChenu | File Added: limesurvey_survey_print2.lss | |
2014-12-16 08:59 | DenisChenu | Note Edited: 31262 | |
2014-12-16 09:02 | DenisChenu | Note Edited: 31262 | |
2014-12-16 10:44 | yurj | Note Added: 31263 | |
2014-12-16 15:24 | aesteban | Note Added: 31267 | |
2014-12-16 15:32 | DenisChenu | Note Added: 31268 | |
2014-12-16 15:51 | aesteban | Note Added: 31269 | |
2014-12-16 16:40 | DenisChenu | Note Added: 31270 | |
2014-12-16 18:38 | aesteban | Changeset attached | => LimeSurvey master a48b8288 |
2014-12-16 18:38 | aesteban | Note Added: 31273 | |
2014-12-16 18:39 | aesteban | Changeset attached | => LimeSurvey 2.06 53e01789 |
2014-12-16 18:39 | aesteban | Note Added: 31274 | |
2014-12-16 19:13 | DenisChenu | Note Added: 31275 | |
2014-12-29 15:33 | c_schmitz | Note Added: 31376 | |
2014-12-29 15:33 | c_schmitz | Status | resolved => closed |
2015-03-21 11:20 | DenisChenu | Relationship added | related to 09576 |
2021-08-03 03:21 | guest | Bug heat | 8 => 10 |