[API] pwg.images.getInfo returns HTML encoded URLs #1445

Open
opened 2026-10-05 00:44:08 +02:00 by adam · 0 comments
Owner

When the option $conf['original_url_protection'] = 'images'; is set, Piwigo replaces the URLs of images with URLs of the type …/action.php?id=9712&part=e.

When this configuration is set, the pwg.images.getInfo method returns an URL of the type …/action.php?id=9712&part=e where the ampersand symbol was replaced with & i.e. HTML encoded (see https://github.com/Piwigo/Piwigo-Mobile/issues/503).

This is not a valid URL and this prevents third party apps to exploit the image (to share it for example). A quick fix would be highly appreciated.

When the option `$conf['original_url_protection'] = 'images';` is set, Piwigo replaces the URLs of images with URLs of the type `…/action.php?id=9712&part=e`. When this configuration is set, the `pwg.images.getInfo` method returns an URL of the type `…/action.php?id=9712&amp;part=e` where the ampersand symbol was replaced with `&amp;` i.e. HTML encoded (see https://github.com/Piwigo/Piwigo-Mobile/issues/503). This is not a valid URL and this prevents third party apps to exploit the image (to share it for example). A quick fix would be highly appreciated. <!-- github-sync-id:1204096109 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/Piwigo#1445