Loading...
 
Skip to main content

Hotwords in wiki page description break wiki links to page

Status
Open
Subject
Hotwords in wiki page description break wiki links to page
Version
15.x
Category
  • Bug
Feature
Hotword
Wiki (page view, edit, history, rename, etc)
Resolution status
New
Submitted by
Philippe Cloutier
Lastmod by
Philippe Cloutier
Rating
(0)
Description

If wiki page x has a description (with preference feature_wiki_description) which contains a hotword, internal links ("wiki links" using the double parentheses syntax) to that page are broken. A ((x|label)) link to page x will display...

Copy to clipboard
Part of page description..." class="wiki wiki_page">label
... with a link to the hotword target on "Part of page description...", but no link to page x.
Files
  1. Parser Neutralize Description Hotwords
Solution

The bug is in parse_data(). It parses wiki links (by calling parse_data_wikilinks()) before hotwords (by calling parse_data_inline_syntax(), via parse_data_process_maketoc()). The resulting HTML has an A element embedded in the normal A element:

Copy to clipboard
<a href="x" title="Part of description before hotword :::::<a class="wiki" href="http://www.hotword.target" target='_blank'>Hotword</a>,:::::" class="wiki wiki_page">label</a>


mose added to replace_hotwords() a hack inserting a ":::::" sequence before and a ",:::::" sequence after each keyword in a description attribute to neutralize the hotword substitution (as described in the function's comments). But this hack was broken by r19319, since both of the characters in the magic sequences (the colon and the comma) are now part of the hotword separator characters (feature_hotwords_sep).

Workaround

Either:

  1. Remove ":" from feature_hotwords_sep
  2. Remove "," from feature_hotwords_sep
  3. Remove hotwords from page descriptions
  4. Use external links rather than wiki links
Importance
6
Easy to solve?
5
Priority
30
Demonstrate Bug on Tiki 19+
Please demonstrate your bug on show2.tiki.org
Demonstrate Bug (older Tiki versions)
Ticket ID
6775
Created
Thursday 13 September, 2018 17:50:24 UTC
by Philippe Cloutier
LastModif
Saturday 06 July, 2024 10:21:44 UTC


Collapse/expand modules below
Show PHP error messages