Tracker textarea field as title may cause invalid HTML and short link when listing (e.g. with TRACKERLIST and showlinks parameter is enabled)
- Status
- Open
- Subject
- Tracker textarea field as title may cause invalid HTML and short link when listing (e.g. with TRACKERLIST and showlinks parameter is enabled)
- Version
- 15.x
16.x
17.x
18.x - Category
- Bug
- Feature
- Trackers
Wiki Plugin (extends basic syntax) - Resolution status
- New
- Submitted by
- Philippe Cloutier
- Lastmod by
- Philippe Cloutier
- Rating
- Description
Each tracker can have 1 title field. When an item of that tracker is listed, the value of that field can link to tiki-view_tracker_item.php. When listing with the TRACKERLIST plugin, the showlinks parameter controls this behavior.
As can be seen in Tracker_Field_Abstract::renderOutput(), this works by surrounding the return value of renderInnerOutput() with opening and closing HTML a element tags.
While this works for simple field types, this is highly unreliable when rendering a textarea field which is wiki-parsed. If the parse generates a link, the result is invalid HTML.
For example, if tracker 1 contains a single Textarea field, and a single item with value "foo\n!!! title
", calling the plugin with "{trackerlist trackerId="1" showlinks="y"}" will cause the field to show as a link only on the first line ("foo"), at least in Google Chrome, since a header inside a link is invalid. I am not sure why, but if listing the items from tiki-view_tracker.php?trackerId=1 instead, the link only stops between the second and third lines (i.e. the title itself links).This issue has probably been there from the time TRACKERLIST was written (r3627). If not, it must have been in r33456 (see renderValue() in https://sourceforge.net/p/tikiwiki/code/33456/tree/trunk/lib/trackers/trackerlib.php ).
- Solution
- I (Chealer) am convinced the only way to fix this is to prevent links on Textarea fields. If we want to link anyway, we should link on other fields, handle clicks around the content (in the margins), or add an explicit link icon when there is no field which allows linking.
- Workaround
- Do not use a textarea field as title
- Importance
- 3
- Easy to solve?
- 3
- Priority
- 9
- Demonstrate Bug on Tiki 19+
-
This bug has been demonstrated on show2.tiki.org
Please demonstrate your bug on show2.tiki.org
Show.tiki.org is not configured properlyThe public/private keys configured to connect to show2.tiki.org were not accepted. Please make sure you are using RSA keys. Thanks.
- Demonstrate Bug (older Tiki versions)
-
This bug has been demonstrated on show.tikiwiki.org
Please demonstrate your bug on show.tikiwiki.org
Show.tiki.org is not configured properlyThe public/private keys configured to connect to show.tikiwiki.org were not accepted. Please make sure you are using RSA keys. Thanks.
- Ticket ID
- 6681
- Created
- Friday 01 June, 2018 21:42:27 UTC
by Philippe Cloutier - LastModif
- Friday 01 June, 2018 22:26:58 UTC