Loading...
 
Skip to main content

Automatic table of contents (auto-TOC) shows calls to SUP plugin as regular text

Status
Open
Subject
Automatic table of contents (auto-TOC) shows calls to SUP plugin as regular text
Category
  • Bug
Feature
Wiki Plugin (extends basic syntax)
Resolution status
New
Submitted by
Philippe Cloutier
Lastmod by
Philippe Cloutier
Rating
(0)
Description

The auto-TOC implementation does not know how to deal with advanced titles. When titles contain plugin calls, since the links can't contain HTML, auto-TOC just strips HTML tags (see the declaration of aText in autoToc.js (var aText = $.trim($this.text());), which may or may not give a valid result. For example, with the following heading:
! The mind behind e=mc{SUP()}2{SUP}
...the TOC entry would just display a raw "The mind behind e=mc2", with nothing in superscript, which - of course - is mathematically highly invalid.

This bug is similar to Automatic table of contents (auto-TOC) shows calls to FOOTNOTE plugin as regular text without link, but about the SUP plugin instead of FOOTNOTE.

Files
  1. Autotoc SUP
Solution
This could be solved by excluding the SUP HTML tag from stripped tags, but unlike PHP's strip_tags(), .text() does not allow excluding tags.
Workaround
maketoc shows the title's HTML unaltered, which is the right thing to do in SUP's case.
Importance
1 low
Priority
5
Demonstrate Bug on Tiki 19+
Demonstrate Bug (older Tiki versions)
Ticket ID
6703
Created
Thursday 14 June, 2018 21:34:04 UTC
by Philippe Cloutier
LastModif
Saturday 06 July, 2024 10:21:44 UTC


Show PHP error messages