goodcui / owaspantisamy

Automatically exported from code.google.com/p/owaspantisamy
0 stars 0 forks source link

Empty strong tag becomes self-closing tag #126

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Steps to reproduce:
1. Try to parse this text:

<p><strong></strong>&nbsp;</p>
<p>abc</p>

2. Policy file
...
    <directives>
        <directive name="maxInputSize" value="300000"/>
        <directive name="useXHTML" value="true"/>
        <directive name="formatOutput" value="true"/>
...
    <tag-rules>
        <tag name="strong" action="validate"/>
...
    <allowed-empty-tags>
        <literal-list>
            <literal value="strong"/>

Expected output:
same as input

Actual output:
<p>
  <strong /> </p>
<p>abc</p>

Version: AS 1.4.5, Windows 7

Please provide any additional information below.
Setting useXHTML to false makes no difference.

Original issue reported on code.google.com by martin.p...@gmail.com on 23 Feb 2012 at 2:21

GoogleCodeExporter commented 9 years ago
I second it!
It should be generalized to any tag.

See also 
http://stackoverflow.com/questions/19343035/antisamy-parser-force-closing-tag

Original comment by franck.v...@googlemail.com on 15 Jan 2015 at 9:40