Loading...
 
Skip to main content

Double code parsing in Articles

Status
Open
Subject
Double code parsing in Articles
Version
3.x
Category
  • Usability
Feature
Article
Submitted by
antoine_agthe
Lastmod by
antoine_agthe
Rating
(0)
Description

tiki-read-artile.php seems to parse code paragraph twice.
I observed that articles parsing worked properly in the preview and in the printable version of an article, but not in the "read" mode.
I edited the "read" and "print" file and "echo"-ed a debug comment in which I tried to display the article body data before parsing:

tiki-read-article.php at line 151
Copy to clipboard
echo "<!-- " . $body . " -->"; // The line I've added $smarty->assign('parse_body', $tikilib->parse_data($body));

tiki-print-article.php at line 82
Copy to clipboard
echo "<!-- " . $body . " -->"; // The line I've added $smarty->assign('parse_body', $tikilib->parse_data($body));


When I call the "read" one, some things in $body are already parsed.
So when the code calls $tikilib->parse_data($body), the code is parsed a second time.

I found the problem when I was trying to display a BASH code with -- parameters

Workaround
It seems that it is because "parse_first" method does not care about the "wiki" property of {CODE()}
Priority
25
Demonstrate Bug on Tiki 19+
Demonstrate Bug (older Tiki versions)
Ticket ID
2759
Created
Monday 21 September, 2009 15:41:17 UTC
by Unknown
LastModif
Monday 21 September, 2009 16:00:17 UTC


Show PHP error messages