This is a very strange bug that I have known about for some time but could not figure how to describe it. I finally just decided to give the test case and see if someone else can figure what's going on.
See
Item3813Test for example of the syntax being tested.
Here's that topic INCLUDED into this topic:
Testing bracketed links inside verbatim tags
Wiki Home
[[%WIKIHOMEURL%][Wiki Home]]
Testing Javascript
Notice: the link works fine, however the very same link placed inside verbatim tags has the web name inserted before the WIKIHOMEURL tag. I don't think this should happen. Should not the content inside the verbatim tags just be left as is?
--
TWiki:Main/LynnwoodBrown
- 26 Mar 2007
This is a bug. When you include a topic from another web and that topic has local links, it needs to prefix topic names with the "web-dot" name so that the link target does not change. It looks like this is done for links inside verbatim as well, which is a bug.
--
TWiki:Main.PeterThoeny
- 27 Mar 2007
Based on a comment in
TWiki:Support.IncludeVariableDoesNotWork
, it appeared that this bug might also be showing up in INCLUDED javascript. However, the revised test case with included javascript does not show any problem.
--
TWiki:Main.LynnwoodBrown
- 27 Mar 2007
Maybe I have mis-understood how TWiki should work in this respect, but I had a problem with the following Javascript in an included topic:
<script type="text/javascript" language="JavaScript">
<!-- Hide JavaScript and <pre> escape TWiki rendering
function set_control_document_fields() {
...
}
// Stop hiding and stop </pre> escaping TWiki rendering -->
</script>
I would expect the
<pre>
...
</pre>
to prevent any TWiki rendering, but TWIki prefixed the function name with the Web, breaking the Javascript. The solution was to rename the function with a non-CamelCase name.
I also tried INCLUDE-ing the topic with
raw="on"
, but encountered the same problem
--
TWiki:Main.MarkRobins
- 27 Mar 2007
pre does not prevent rendering. Only verbatim tags. That is per spec.
Otherwise you cannot have pre formatted output which consists of interpreted variables and included text. I use this a lot.
--
TWiki:Main.KennethLavrsen
- 27 Mar 2007
Thanks for the clarification Kenneth. But shouldn't
raw="on"
have prevented rendering?
--
TWiki:Main.MarkRobins
- 28 Mar 2007
It is important we keep one bug per item. so if there is a problem with rar="on" then please open a new bug report with this and it will help if you make an example in the LitterTray web.
--
TWiki:Main.KennethLavrsen
- 28 Mar 2007
I checked in a unit testcase that illustrates the problem.
Later: I fixed it.
--
TWiki:Main.CrawfordCurrie
- 13 Apr 2007