Ignore:
Timestamp:
11/28/08 15:12:15 (3 years ago)
Author:
CrawfordCurrie
Message:

Item6041: fix empty bullet list Item324: get it working on Foswiki Item295: further detoxing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/WysiwygPlugin/lib/Foswiki/Plugins/WysiwygPlugin.pm

    r1039 r1043  
    99 
    1010Note: In the case of a new topic, you might expect to see the "create topic" 
    11 screen in the editor when it goes back to twiki for the topic content. This 
     11screen in the editor when it goes back to Foswiki for the topic content. This 
    1212doesn't happen because the earliest possible handler is called on the topic 
    1313content and not the template. The template is effectively ignored and a blank 
     
    3030use Encode; 
    3131 
    32 require Foswiki::Func;    # The plugins API 
    33 require Foswiki::Plugins; # For the API version 
    34 require Foswiki::Plugins::WysiwygPlugin::Constants; 
     32use Foswiki::Func;    # The plugins API 
     33use Foswiki::Plugins; # For the API version 
     34use Foswiki::Plugins::WysiwygPlugin::Constants; 
    3535 
    3636use vars qw( $VERSION $RELEASE $SHORTDESCRIPTION $SECRET_ID $NO_PREFS_IN_TOPIC ); 
     
    4545 
    4646$SECRET_ID = 'WYSIWYG content - do not remove this comment, and never use this identical text in your topics'; 
     47 
     48sub WHY { 1 }; 
    4749 
    4850sub initPlugin { 
     
    495497    if( $exclusions =~ /calls/ 
    496498          && $_[0] =~ /%((?!($calls_ok){)[A-Z_]+{.*?})%/s ) { 
    497         #print STDERR "WYSIWYG_DEBUG: has calls $1 (not in $calls_ok)\n"; 
     499        print STDERR "WYSIWYG_DEBUG: has calls $1 (not in $calls_ok)\n" 
     500          if (WHY); 
    498501        return "Text contains calls"; 
    499502    } 
    500503    if( $exclusions =~ /(macros|variables)/ && $_[0] =~ /%([A-Z_]+)%/s ) { 
    501         #print STDERR "$exclusions WYSIWYG_DEBUG: has macros $1\n"; 
     504        print STDERR "$exclusions WYSIWYG_DEBUG: has macros $1\n" 
     505          if (WHY); 
    502506        return "Text contains macros"; 
    503507    } 
    504508    if( $exclusions =~ /html/ && 
    505509          $_[0] =~ /<\/?((?!literal|verbatim|noautolink|nop|br)\w+)/ ) { 
    506         #print STDERR "WYSIWYG_DEBUG: has html: $1\n"; 
     510        print STDERR "WYSIWYG_DEBUG: has html: $1\n" 
     511          if (WHY); 
    507512        return "Text contains HTML"; 
    508513    } 
    509514    if( $exclusions =~ /comments/ && $_[0] =~ /<[!]--/ ) { 
    510         #print STDERR "WYSIWYG_DEBUG: has comments\n"; 
     515        print STDERR "WYSIWYG_DEBUG: has comments\n" 
     516          if (WHY); 
    511517        return "Text contains comments"; 
    512518    } 
    513519    if( $exclusions =~ /pre/ && $_[0] =~ /<pre\w/ ) { 
    514         #print STDERR "WYSIWYG_DEBUG: has pre\n"; 
     520        print STDERR "WYSIWYG_DEBUG: has pre\n" 
     521          if (WHY); 
    515522        return "Text contains PRE"; 
    516523    } 
Note: See TracChangeset for help on using the changeset viewer.