Loading...
 
Skip to main content

Inline style attribute stripped in DIV plugin and others in Tiki29.x

Status
Closed
Subject
Inline style attribute stripped in DIV plugin and others in Tiki29.x
Version
29.x
Category
  • Bug
  • Regression
  • Easy for Newbie Dev
Feature
Wiki (page view, edit, history, rename, etc)
Wiki Plugin (extends basic syntax)
Resolution status
Fix on the Way
Submitted by
Bernard Sfez / Tiki Specialist
Lastmod by
Bernard Sfez / Tiki Specialist
Rating
(0)
Description

The style= attribute passed to {DIV} and other wiki plugins is silently dropped.
I believe (I'm not pro understanding git) it comes from here: https://gitlab.com/tikiwiki/tiki/-/commit/7b9d81b6f30c7532bee770079ddeead22838a3f1

In lib/wiki-plugins/wikiplugin_div.php, the function wikiplugin_div() initializes $style = '' before calling extract($params, EXTR_SKIP). Because EXTR_SKIP skips extraction when a variable already exists, the style parameter from $params never overwrites the empty $style variable.

At lib/wiki-plugins/wikiplugin_div.php
I changed :

Copy to clipboard
function wikiplugin_div($content, $params) { $style = ''; extract($params, EXTR_SKIP);


For

Copy to clipboard
function wikiplugin_div($content, $params) { extract($params, EXTR_SKIP); $style = $style ?? '';


refreshed the cache en the issue was fixed.

Solution
Workaround
Importance
7
Easy to solve?
5
Priority
35
Demonstrate Bug on Tiki 19+
Demonstrate Bug (older Tiki versions)
Ticket ID
8926
Reviewed by Wishlist Team On
19 Feb 26 09:17 UTC
Created
Wednesday 18 February, 2026 22:06:20 UTC
by Bernard Sfez / Tiki Specialist
LastModif
Wednesday 25 February, 2026 16:48:09 UTC


Show PHP error messages