• 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.

It seem that VERBATIM tags do not work when they are written in uppercase.

See examples below


Does not work

Debian has not provided deb packages for ffmpeg due patent issues. However this is about to change so checkout for availability of newer versions of debian ffmpeg debs. You can build yourself from source or from Christian Marillat website or apt repository.

deb ftp://ftp.nerim.net/debian-marillat/ stable main # ( woody )
deb ftp://ftp.nerim.net/debian-marillat/ testing main # ( sarge )
deb ftp://ftp.nerim.net/debian-marillat/ unstable main # ( sid )
Add the suitable line to your /etc/apt/sources.list and run this:
apt-get update ; apt-get -y install ffmpeg libavcodec1 libavcodec1-dev


Works

Debian has not provided deb packages for ffmpeg due patent issues. However this is about to change so checkout for availability of newer versions of debian ffmpeg debs. You can build yourself from source or from Christian Marillat website or apt repository.

deb ftp://ftp.nerim.net/debian-marillat/ stable main # ( woody )
deb ftp://ftp.nerim.net/debian-marillat/ testing main # ( sarge )
deb ftp://ftp.nerim.net/debian-marillat/ unstable main # ( sid )
Add the suitable line to your /etc/apt/sources.list and run this:
apt-get update ; apt-get -y install ffmpeg libavcodec1 libavcodec1-dev


I have used upper case everywhere on the webs.

So has my users. All are used to HTML tags working both in upper and lower case.

This is a serious backwards compatibility issue that will break 1000s of Twiki topics if not fixed.

KJL

Update PRE tags work. It is only VERBATIM tags in upper case that are ignored.

KJL

I have found out that the problem lies in /lib/TWiki/Render.pm

The function takeOutBlocks does not do any of its regexes case-insensitive.

So I tried this

Index: Render.pm
===================================================================
--- Render.pm   (revision 7779)
+++ Render.pm   (working copy)
@@ -1485,21 +1485,21 @@
     my( $this, $intext, $tag, $map ) = @_;
     ASSERT($this->isa( 'TWiki::Render')) if DEBUG;
 
-    return $intext unless( $intext =~ m/<$tag\b/ );
+    return $intext unless( $intext =~ m/<$tag\b/i );
 
     my $out = '';
     my $depth = 0;
     my $scoop;
     my $tagParams;
 
-    foreach my $token ( split/(<\/?$tag[^>]*>)/, $intext ) {
-       if ($token =~ /<$tag\b([^>]*)?>/) {
+    foreach my $token ( split/(<\/?$tag[^>]*>)/i, $intext ) {
+       if ($token =~ /<$tag\b([^>]*)?>/i) {
           $depth++;
           if ($depth eq 1) {
              $tagParams = $1;
              next;
           }
-       } elsif ($token =~ /<\/$tag>/) {
+       } elsif ($token =~ /<\/$tag>/i) {
             if ($depth > 0) {
                 $depth--;
                 if ($depth eq 0) { 

And then VERBATIM works.

I am not sure I need to add the i's everywhere but at least the diff above should make fixing the bug very easy.

KJL

An interesting point. Cairo supported <VERBatim> but not <NOAUTOLINK> (because of the crap way it handled tags). Your change means that all tags are now case-insensitive, which is another, though different, incompatibility.

I think on balance that allowing case insensitivity if best (though the tag should have been %VERBATIM% from day one to avoid this sort of shit.

SVN 7794

CC

ItemTemplate
Summary Uppercase VERBATIM tags no longer work. They worked in Cairo and were used everywhere by users
ReportedBy KennethLavrsen
Codebase

SVN Range Sun, 04 Dec 2005 build 7760
AppliesTo Engine
Component

Priority Urgent
CurrentState Closed
WaitingFor

Checkins 7794
Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r5 - 2005-12-07 - CrawfordCurrie
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback