Changeset 1043 for trunk/WysiwygPlugin/lib/Foswiki/Plugins/WysiwygPlugin.pm
- Timestamp:
- 11/28/08 15:12:15 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WysiwygPlugin/lib/Foswiki/Plugins/WysiwygPlugin.pm
r1039 r1043 9 9 10 10 Note: 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. This11 screen in the editor when it goes back to Foswiki for the topic content. This 12 12 doesn't happen because the earliest possible handler is called on the topic 13 13 content and not the template. The template is effectively ignored and a blank … … 30 30 use Encode; 31 31 32 require Foswiki::Func; # The plugins API33 require Foswiki::Plugins; # For the API version34 require Foswiki::Plugins::WysiwygPlugin::Constants;32 use Foswiki::Func; # The plugins API 33 use Foswiki::Plugins; # For the API version 34 use Foswiki::Plugins::WysiwygPlugin::Constants; 35 35 36 36 use vars qw( $VERSION $RELEASE $SHORTDESCRIPTION $SECRET_ID $NO_PREFS_IN_TOPIC ); … … 45 45 46 46 $SECRET_ID = 'WYSIWYG content - do not remove this comment, and never use this identical text in your topics'; 47 48 sub WHY { 1 }; 47 49 48 50 sub initPlugin { … … 495 497 if( $exclusions =~ /calls/ 496 498 && $_[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); 498 501 return "Text contains calls"; 499 502 } 500 503 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); 502 506 return "Text contains macros"; 503 507 } 504 508 if( $exclusions =~ /html/ && 505 509 $_[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); 507 512 return "Text contains HTML"; 508 513 } 509 514 if( $exclusions =~ /comments/ && $_[0] =~ /<[!]--/ ) { 510 #print STDERR "WYSIWYG_DEBUG: has comments\n"; 515 print STDERR "WYSIWYG_DEBUG: has comments\n" 516 if (WHY); 511 517 return "Text contains comments"; 512 518 } 513 519 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); 515 522 return "Text contains PRE"; 516 523 }
Note: See TracChangeset
for help on using the changeset viewer.
