• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Item3813: Web reference gets inappropriately inserted into bracketed links inside verbatim tags.

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Engine   Normal Closed   minor 4.2.0

Edit Form Data

Summary:
Reported By:
Codebase:
Applies To:
Component:
Priority:
Current State:
Waiting For:
Target Release:
Released In:
 

Detail

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

ItemTemplate
Summary Web reference gets inappropriately inserted into bracketed links inside verbatim tags.
ReportedBy TWiki:Main.LynnwoodBrown
Codebase

SVN Range TWiki-4.1.2, Mon, 26 Mar 2007, build 13227
AppliesTo Engine
Component

Priority Normal
CurrentState Closed
WaitingFor

Checkins TWikirev:13368 TWikirev:13369
TargetRelease minor
ReleasedIn 4.2.0
Edit | Attach | Watch | Print version | History: r14 < r13 < r12 < r11 < r10 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r14 - 2008-01-22 - KennethLavrsen
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2023 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback