This might be a consequence of
raw
but not always desirable.
AC
raw
is
raw
(meaning "grab everything untouched"), but perhaps there's a need for additional parameters to include.
As mentioned in
Item1977, perhaps there's a need for a set of options?
Default manipulations done in INCLUDE (which are all disabled with
raw
) looks like this, it is the latter substitution that is wanted as optional with this item. Any need for the others (or completely new ones / additions) to be optional as well?
$text =~ s/^.*?<\/head>//is; # remove all HEAD
$text =~ s/<script.*?<\/script>//gis; # remove all SCRIPTs
$text =~ s/^.*?<body[^>]*>//is; # remove all to <BODY>
$text =~ s/(?:\n)<\/body>.*//is; # remove </BODY>
$text =~ s/(?:\n)<\/html>.*//is; # remove </HTML>
$text =~ s/(<[^>]*>)/_removeNewlines($1)/ges;
# SMELL: this will miss all JavaScript links
$text =~ s/(\s(?:href|src|action)=(["']))(.*?)\2/$1._rewriteURLInInclude( $host, $path, $3 ).$2/geois;
--
SP
Options could be called something like:
-
disableremoveheaders
-
disableremovescript
-
disablecompresstags
-
disablerewriteurls
-
disable_manipulation_x_
And
raw
would just be a shortcut for disabling all default manipulations?
--
SP
Added disable-parameters.
Looking at
TWiki:TWiki.IncludeTopicsAndWebPages
the example currently breaks because of the new apache security filter for includes installed at twiki.org.
Is it easier to make an exception to the filter for demonstration purposes, or come up with another example? (I would prefer the demo pointing to twiki.org where we can keep the url cool).
Currently the demonstration topic cannot retrieve the Tokyo time because all it gets from t.o. is a " Forbidden: You don't have permission to access /cgi-bin/xtra/tzdate on this server." error.
%INCLUDE{"http://TWiki.org/cgi-bin/xtra/tzdate?tz=Asia/Tokyo"}%
--
SP
This topic was lost from the lists due to not having a codebase field. Rediscovered 3/2/07. Just set it to "No Action" if it is dead.
CC
No comments for a long time, so I assume it's dead.
CC