TWiki.org's Plugins web's
WebRss feed is broken.
The description of
VarUSERSIG contains
\0
byte characters as seen here in this octal dump:
od -c WebRss.html
0000000 < ? x m l v e r s i o n = " 1
0000020 . 0 " e n c o d i n g = " i s
0000040 o - 8 8 5 9 - 1 " ? > < r d f
0000060 : R D F x m l n s : r d f = "
.....
0016740 / i t e m > \n < i t e m r d f
0016760 : a b o u t = " h t t p : / / t
0017000 w i k i . o r g / c g i - b i n
0017020 / v i e w / P l u g i n s / V a
0017040 r U S E R S I G " > \n < t i
0017060 t l e > V a r U S E R S I G < /
0017100 t i t l e > \n < l i n k > h
0017120 t t p : / / t w i k i . o r g /
0017140 c g i - b i n / v i e w / P l u
0017160 g i n s / V a r U S E R S I G <
0017200 / l i n k > \n < d e s c r i
0017220 p t i o n > # V a r U S E R S I
0017240 G U S E R S I G s h o w u
0017260 s e r s i g n a t u r e w i
0017300 t h p r o f i l e p i c t u
0017320 r e i c o n S y n t a x :
0017340 % n o p U S E R S I G { W i
0017360 k i N a m e o r % n o p
0017400 U S E R S I G { W i k i N a m e
0017420 Y Y Y Y M M D D \0 e s c
0017440 \0 1 } . . . ( l a s t
0017460 c h a n g e d b y P e t e r
0017500 T h o e n y ) < / d e s c r i p
0017520 t i o n > \n < d c : d a t e
0017540 > 2 0 1 3 - 0 3 - 1 0 T 0 6 : 5
0017560 8 : 5 0 Z < / d c : d a t e > \n
0017600 < d c : c o n t r i b u t o
Source in VarUSERSIG:
%<nop>USERSIG{WikiName - YYYY-MM-DD}%
Actual output:
% nop USERSIG{WikiName YYYY MM DD\0 esc \0 1}
Expected output:
USERSIG{WikiName YYYY MM DD}
--
TWiki:Main/PeterThoeny
- 2013-03-14
This is now fixed in TWiki::Render in svn trunk and 5.1 branch.
Negative enumeration of
{ }
in
%VAR{}%
caused the cleanup of unbalanced brackets to fail in TWiki::Render, which introduced the null characters in RSS feeds.
Patch:
--- TWiki/Render.pm (revision 25226)
+++ TWiki/Render.pm (working copy)
@@ -1452,7 +1452,7 @@
# Format e-mail to add spam padding (HTML tags removed later)
$text =~ s/$STARTWW((mailto\:)?[a-zA-Z0-9-_.+]+@[a-zA-Z0-9-_.]+\.[a-zA-Z0-9-_]+)$ENDWW/_mailLink( $this, $1 )/gem;
$text =~ s/<!--.*?-->//gs; # remove all HTML comments
- $text =~ s|<nop[ />]*>|$nopToken|g; # escape <nop>
+ $text =~ s|<nop[ /]*>|$nopToken|g; # escape <nop>
$text =~ s/<[^>]*>//g; # remove all HTML tags
$text =~ s/\&[a-z]+;/ /g; # remove entities
if( $opts =~ /nohead/ ) {
@@ -1493,7 +1493,7 @@
$result = "$escToken$$theLevelRef$theOpen";
} else {
$result = "$escToken$$theLevelRef$theClose";
- $$theLevelRef--;
+ $$theLevelRef-- if( $$theLevelRef > 0 );
}
return $result;
}
--
TWiki:Main.PeterThoeny
- 2013-03-15
At the same time I fixed the
SpreadSheetPlugin that uses the same logic to enumerate the function brackets. They are now guarded to never be negative.
--
TWiki:Main.PeterThoeny
- 2013-03-15