[TikiWiki-commits] [Git][tikiwiki/tiki][28.x] [BP][FIX] wikiplugin_pdf: Ensure single quotes in parameters are encoded as HTML

"Sammy Ndabo \(@ndabosam084\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <689c8740cc49b_2cd66a0906f7@gitlab-sidekiq-low-urgency-cpu-bound-v2-6744d78d97-6nt4c.mail>

Sammy Ndabo pushed to branch 28.x at Tiki Wiki CMS Groupware / Tiki


Commits:
0deb0c83 by Sammy Ndabo at 2025-08-13T12:31:31+00:00
[BP][FIX] wikiplugin_pdf: Ensure single quotes in parameters are encoded as HTML
---
* [BP][FIX] wikiplugin_pdf: Ensure single quotes in parameters are encoded as HTML
---
* [FIX] wikiplugin_pdf: Ensure single quotes in parameters are encoded as HTML
---
* [FIX] wikiplugin_pdf: Ensure single quotes in parameters are encoded as HTML

* [FIX] wikiplugin_tracker: Allow not having a preview button

See merge request tikiwiki/tiki!8282

(cherry picked from commit c89b79353479afdef8184f80847b77ea77b83fac)

* [NEW] ExportPDF: Add new action for ListExecute to export a wiki page as PDF and a console command
---
* [REF] PagePdfExporter: refactor PDF generation logic

* [ENH] PagePrintCommand: add warning message for default PDF export path as there are saved in a publicly accessible place

* [ENH] PagePrintCommand: update output option description for clarity on PDF export path

* [FIX] PagePrintCommand: update command description to accurately reflect PDF export functionality

* [REF] PagePdfExporter: streamline page access validation and enhance error handling

* [FIX] PagePdfExporter: fix lints and namespace error

* [FIX] PagePdfExporter: Use output path for exported PDFs default to TEMP_PUBLIC_PATH and ensure any defined directory exists

* [FIX] PagePdfExporter: Improve error handling for PDF generation failure

* [FIX] wikiplugin_listexecute.php: Fix export PDF action class name in listexecute plugin

* [REF] wiki to PDF export functionality: delegate to PagePdfExporter and streamline PagePrintCommand

* [NEW] Add PagePrintCommand to export a printer-friendly version of a page

* Fix a few phpcs lints errors

* [NEW] ExportPDF: Add new action for ListExecute to export a wiki page as PDF

See merge request tikiwiki/tiki!7767

(cherry picked from commit 7ed31d9cee2754f4d7e078098923f9d950b62019)

See merge request tikiwiki/tiki!8283

(cherry picked from commit 5ecfcaf1495dd54d7719b35607c4f2917b4ed0e2)

See merge request tikiwiki/tiki!8284

- - - - -


1 changed file:

- lib/wiki-plugins/wikiplugin_pdf.php


Changes:

=====================================
lib/wiki-plugins/wikiplugin_pdf.php
=====================================
@@ -309,6 +309,10 @@ function wikiplugin_pdf($data, $params)
     $paramList = '';
     //creating string of data paramaters set by user
     foreach ($params as $paramName => $param) {
+        if (str_contains($param, '\'')) {
+            // encode single quotes as html
+            $param = str_replace('\'', '&#039;', $param);
+        }
         $paramList .= $paramName . "='" . $param . "' ";
     }
     return "<pdfsettings " . $paramList . "></pdfsettings>";



View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/0deb0c83ce932af25e9773cb64702b19f2de928b

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/0deb0c83ce932af25e9773cb64702b19f2de928b
You're receiving this email because of your account on gitlab.com.

_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.