FotoPro - Quotation mark in gallery name and short description

Erweiterungen
Post Reply
Doc
Posts: 38
Joined: Fri 25. Dec 2015, 09:20

FotoPro - Quotation mark in gallery name and short description

Post by Doc »

Hello

When you edit a gallery in FotoPro and the name of the gallery or the short description of the gallery contains a quotation mark ( ' ), this turns into a digital code ' when we ask for the creation of thumbnails.
Example: Caroline's farm -> Caroline's farm
This is not annoying, because we can rewrite, but it comes back to each creation of thumbnails.
Weird no?

Cordially, Daniel.
Gert
Posts: 2075
Joined: Sun 18. Nov 2012, 14:18

Re: FotoPro - Quotation mark in gallery name and short description

Post by Gert »

Hello,

there is htmlspecialchars() in action, for safety and to prevent double quotes in name and description, which would destroy the structure of the data textfile.

You can open admin.php and search and repace:

ENT_ QUOTES => ENT_COMPAT (6 times), but that will leave the same problems with double quotes, double quotes MUST be prevented.

A real solution, that allows all characters, will be included in the next version,

Gert
Last edited by Gert on Wed 3. Feb 2021, 08:55, edited 1 time in total.
Gert Ebersbach | CMSimple | Templates - Plugins - Services
Doc
Posts: 38
Joined: Fri 25. Dec 2015, 09:20

Re: FotoPro - Quotation mark in gallery name and short description

Post by Doc »

I can wait for the new version. For now I just need to rewrite after creating the thumbnails.
Daniel.
Gert
Posts: 2075
Joined: Sun 18. Nov 2012, 14:18

Re: FotoPro - Quotation mark in gallery name and short description

Post by Gert »

Hi,

new cognition: It was the multiple execution of htmlspecialchars.

input : &
1. execution: &
2. execution: &
and so on ...

The data file will be new written by several actions, also by creation of new thumbnail images.

Simple solution:

Code: Select all

htmlspecialchars(htmlspecialchars_decode($string, ENT_QUOTES), ENT_QUOTES, 'UTF-8') 
Looks crazy - but works ;)

New version is available - Gert
Gert Ebersbach | CMSimple | Templates - Plugins - Services
Doc
Posts: 38
Joined: Fri 25. Dec 2015, 09:20

Re: FotoPro - Quotation mark in gallery name and short description

Post by Doc »

Hello
Thank you for this new version.
I allow a suggestion for a multilingual gallery: depending on the language setting could we not have for the data.php file located in the gallery folder: dataen.php, datade.php, datafr.php ...

For my personal case, I added the rel="nofollow" statement to lines 392, 395, 405, 408, 418, 421, 527, 532 to the file /plugins/fotopro/index.php to avoid unnecessary referencing of these pages despite the robots.txt file.

Cordially Daniel.
Gert
Posts: 2075
Joined: Sun 18. Nov 2012, 14:18

Re: FotoPro - Quotation mark in gallery name and short description

Post by Gert »

Doc wrote: Thu 4. Feb 2021, 09:38 I allow a suggestion for a multilingual gallery: depending on the language setting could we not have for the data.php file located in the gallery folder: dataen.php, datade.php, datafr.php ...
Sorry - but that's to much at the moment. Bugfixes are ok, but I do not want to extend the functionality of FotoPro at the moment.

And: if you change something in a gallery (maybe add or delete images) and do not update the data file in every language, there may occure some problems.

You can make copys of every gallery named en_gallery-name, fr_gallery-name and so on,. Today, Webspace is provided in GByte ;)
Doc wrote: Thu 4. Feb 2021, 09:38 For my personal case, I added the rel="nofollow" statement to lines 392, 395, 405, 408, 418, 421, 527, 532 to the file /plugins/fotopro/index.php to avoid unnecessary referencing of these pages despite the robots.txt file.
Perhaps in the next version, maybe next year, but I am not sure, if everyone wants that,

Gert
Gert Ebersbach | CMSimple | Templates - Plugins - Services
Gert
Posts: 2075
Joined: Sun 18. Nov 2012, 14:18

Re: FotoPro - Quotation mark in gallery name and short description

Post by Gert »

Hi Doc,

sometimes one year has just a few days ;)

I have a multilingual (beta-) version of FotoPro ready for testing:

You can make a copy of data.php => data_en.php (etc), and FotoPro will use it in the respective language. You have to do it offline, and upload by ftp, because I do not want, that anything changes for normal users.

After that, the new data_xx.php is used also in the FotoPro backend in the respective language, and you can translate it in the backend.

If you are interested in testing the new FotoPro beta-version, I will send you a download link by PM,

Gert
Gert Ebersbach | CMSimple | Templates - Plugins - Services
Doc
Posts: 38
Joined: Fri 25. Dec 2015, 09:20

Re: FotoPro - Quotation mark in gallery name and short description

Post by Doc »

Hello
I am interested to test this beta, you can send me the link by private messaging.
Cordially
Post Reply