mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-07-29 04:53:57 +02:00
fixes #796 handle ampersand escaping for API URLs
When generating URLs for the web service (IN_WS), ensure the argument separator is a raw '&' instead of the HTML entity '&'. add_url_params now switches the separator to '&' if IN_WS is defined and '&' was requested. Removed a redundant str_replace call in ws_std_get_urls since get_action_url/add_url_params now produce the correct separator. This prevents double-escaped ampersands.
This commit is contained in:
@@ -169,7 +169,7 @@ function ws_std_get_urls($image_row)
|
||||
$ret['download_url'] = null;
|
||||
if ($provide_download_url)
|
||||
{
|
||||
$ret['download_url'] = str_replace('&', '&', get_action_url($image_row['id'], 'e', true));
|
||||
$ret['download_url'] = get_action_url($image_row['id'], 'e', true);
|
||||
}
|
||||
|
||||
$derivatives = DerivativeImage::get_all($src_image);
|
||||
|
||||
Reference in New Issue
Block a user