Skip to content

Commit

Permalink
Item2183: Protect div with style= attribute by default
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.foswiki.org/branches/Release01x00@5356 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
GeorgeClark authored and GeorgeClark committed Oct 22, 2009
1 parent 16b6c81 commit 853ec4a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions WysiwygPlugin/data/System/WysiwygPlugin.txt
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ Many thanks to the following sponsors for supporting this work:
| Version: | %$VERSION% |
| Release: | %$RELEASE% |
| Change History: | |
| 22 Oct 2009 | Foswikitask:Item2183: Protect div style= by default |
| 18 Sep 2009 | Foswikitask:Item1980: Prevent dataloss when saving a topic in Wysiwyg where there are a pair of sticky tags inside verbatim tags |
| 28 Jun 2009 | Foswikitask:Item1770: Protect XML tags registered by plugins, and not just the content between them (Michael Tempest) |
| 6 Jun 2009 | Foswikitask:Item1013: Correct dependency on HTML::Parser (Will Norris) Foswikitask:Item1397: Foswikitask:Item1535: Foswikitask:Item1666: Correct processing of colour and typewriter-text in several situations, include application to bold text and table cells (Michael Tempest) Foswikitask:Item1667: Remove unwanted extra <sticky> tags (Michael Tempest) Foswikitask:Item1674: Let plugins register XML tags that should be protected like macros |
Expand Down
2 changes: 1 addition & 1 deletion WysiwygPlugin/data/System/WysiwygPluginSettings.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ in the plugin:
COL=char,charoff,span,valign,width;
COLGROUP=align,char,charoff,span,valign,width;
DIR=compact;
DIV=align;
DIV=align,style;
DL=compact;
FONT=size,face;
H[0-9]=align;
Expand Down
7 changes: 5 additions & 2 deletions WysiwygPlugin/lib/Foswiki/Plugins/WysiwygPlugin.pm
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,7 @@ br=clear;
col=char,charoff,span,valign,width;
colgroup=align,char,charoff,span,valign,width;
dir=compact;
div=align;
div=align,style;
dl=compact;
font=size,face;
h\d=align;
Expand Down Expand Up @@ -728,7 +728,10 @@ DEFAULT
}
foreach my $row (@protectedByAttr) {
if ( $tag =~ /^$row->{tag}$/i ) {
return 1 if ( $attr =~ /^($row->{attrs})$/i );
if ( $attr =~ /^($row->{attrs})$/i ) {
#print STDERR "Protecting $tag with $attr matches $row->{attrs} \n"; #debug
return 1;
}
}
}
return 0;
Expand Down

0 comments on commit 853ec4a

Please sign in to comment.