Skip to content

Commit

Permalink
Item12388: remove XML attribute Item10239: don't convert tables that …
Browse files Browse the repository at this point in the history
…have a class
  • Loading branch information
cdot committed Mar 1, 2017
1 parent 7fed6fd commit b9b7f0d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
4 changes: 3 additions & 1 deletion WysiwygPlugin/lib/Foswiki/Plugins/WysiwygPlugin/HTML2TML.pm
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ p=align;
param=name,type,value,valuetype;
pre=width;
q=cite;
table=align,bgcolor,.*?background-color:.*,frame,rules,summary,width;
table=align,bgcolor,class,.*?background-color:.*,frame,rules,summary,width;
tbody=align,char,charoff,valign;
td=abbr,align,axis,bgcolor,.*?background-color:.*,.*?border-color:.*,char,charoff,headers,height,nowrap,rowspan,scope,valign,width;
tfoot=align,char,charoff,valign;
Expand Down Expand Up @@ -204,6 +204,8 @@ DEFAULT

HTML::Entities::_decode_entities( $text, WC::safeEntities() );

$text =~ s/\'/\&\#39;/go;

# get rid of nasties
$text =~ s/\r//g;
$text =~ s.(</[uo]l>)\s*.$1.gis; # Item5664
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -598,6 +598,7 @@ sub generate {

# make the names of the function versions
$tag =~ s/!//; # DOCTYPE

my $tmlFn = '_handle' . uc($tag);

$this->_moveClassToSpan('WYSIWYG_TT');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ HERE
setup =>
sub { Foswiki::Func::getContext()->{'TablePluginEnabled'} = 0; },
html => <<'HERE',
<table cellspacing="1" cellpadding="0" border="1" class="plain" _moz_resizing="true">
<table cellspacing="1" cellpadding="0" border="1" _moz_resizing="true">
<tbody>
<tr>a0<td>a1</td><td>a2</td><td>a3</td></tr>
<tr>b0<td colspan="2">b1</td><td>b3</td></tr>
Expand Down
2 changes: 1 addition & 1 deletion WysiwygPlugin/test/unit/WysiwygPlugin/TranslatorTests.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1924,7 +1924,7 @@ Inside
exec => HTML2TML,
name => 'kupuTable',
html =>
'<table cellspacing="1" cellpadding="0" border="1" class="plain" _moz_resizing="true">
'<table cellspacing="1" cellpadding="0" border="1" _moz_resizing="true">
<tbody>
<tr>a0<td>a1</td><td>a2</td><td>a3</td></tr>
<tr>b0<td colspan="2">b1</td><td>b3</td></tr>
Expand Down

0 comments on commit b9b7f0d

Please sign in to comment.