Loading...
 
Skip to main content

IMG plugin scaling ignored with percentages in width or height parameters

Status
Open
Subject
IMG plugin scaling ignored with percentages in width or height parameters
Version
12.x
15.x
18.x
Category
  • Regression
Feature
Wiki Plugin (extends basic syntax)
Resolution status
New
Submitted by
Philippe Cloutier
Lastmod by
Philippe Cloutier
Rating
(0)
Description

Since r24627Question, the IMG plugin supports percentages in its width or height parameter to scale the image. For example...
{img fileId="2970" width="50%"}
... would display image 2970 with its original dimensions halved.

This was unfortunately broken for Tiki 9 and later on some systems by r37006Question. Setting dimensions this way is ignored, for example on French systems, which use a comma as decimal separator instead of a point.

The attached patch fixes in 2 ways. Any one is sufficient. The change to tiki-download_file.php is not quite clean as it alters $_GET.

Note that this exposes a lack of validation in tiki-download_file.php.

Files
  1. Wikiplugin Img Scale Fix
Importance
7
Easy to solve?
9
Priority
63
Demonstrate Bug on Tiki 19+
Demonstrate Bug (older Tiki versions)
Ticket ID
6731
Created
Wednesday 25 July, 2018 22:09:19 UTC
by Philippe Cloutier
LastModif
Saturday 06 July, 2024 10:21:44 UTC


Show PHP error messages