Item9432: Not all raw views are completely raw
Priority: Urgent
Current State: Closed
Released In: 1.1.0
Target Release: minor
Applies To: Engine
Component: Render
Branches:
The
raw=text
and
raw=all
views pass the raw topic text to the
Foswiki::writeCompletePage
for content-type of
text/plain
.
writeCompletePage
removes <nop> and <noautolink> tags from the page, resulting in an incomplete view of the raw topic.
I would think that
raw=on
and
raw=text
should give equivalent results, except for plain text vs. HTML. and
raw=debug
and
raw=all
should also be equivalent.
I believe the fix is to have
Foswiki::writeCompletePage
test for and bypass any tag processing for the raw type views.
I'm marking this urgent to try to get some feedback - Does anyone know if removing noautolink and nop from certain raw views is by design or a bug? I have a new tabbed view working -
http://trunk.foswiki.org/Sandbox/TestTabbedViewTopic using a view template
http://trunk.foswiki.org/Sandbox/TestTabbedViewTemplate But discovered that the raw=text view is missing things.
--
GeorgeClark - 04 Aug 2010
Test: %RED% WikiWord
There are multiple bugs :/
- http://foswiki.org/Tasks/Item9432?raw=text shows <nop> and <noautolink>, but http://trunk.foswiki.org/Tasks/Item9432?raw=text does not.
- http://foswiki.org/Tasks/Item9432?raw=on and http://trunk.foswiki.org/Tasks/Item9432?raw=on show <nop> and <noautolink> (in a
textarea
), and similarly if I add skin=plain
or skin=classic
, but not http://foswiki.org/Tasks/Item9432?raw=on&skin=text and http://foswiki.org/Tasks/Item9432?raw=on&skin=text. Curiously, it also works if I add skin=rss
, even though the rss skin has no textarea.
The change of behaviour for
raw=text
is certainly a bug, and so I am changing the state to confirmed, and targetting it for 1.1.
AFAIK, the whole point of raw is to see what is really there. I suspect that the raw views have always used a textarea to show the topic text and the call to CGI::textarea has encoded &, < and > in the topic text. If the use of textarea to do the escaping was "by design", then surely the behaviour with skin=text is also a bug.
--
MichaelTempest - 04 Aug 2010
I can confirm that things have changed since 1.0.9.
--
KennethLavrsen - 04 Aug 2010
Excellent Thanks I've been tracing through this for a while, so I'll put myself down to try to fix it.
--
GeorgeClark - 04 Aug 2010