[
https://issues.apache.org/jira/browse/XERCESJ-1602?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13566484#comment-13566484
]
Nasir Hussain commented on XERCESJ-1602:
----------------------------------------
change required in org.apache.xml.serialize.HTMLSerializer.endElementIO()
{code}
if ( _xhtml) {
if ( state.empty ) {
if(rawName.equalsIgnoreCase("iframe"))
_printer.printText( " ></iframe>" );
else
_printer.printText( " />" );
} else {
// Must leave CData section first
if ( state.inCData )
_printer.printText( "]]>" );
// XHTML: element names are lower case, DOM will be different
_printer.printText( "</" );
_printer.printText( state.rawName.toLowerCase(Locale.ENGLISH) );
_printer.printText( '>' );
}
}
{code}
> Iframe element is serialized incorrectly
> ----------------------------------------
>
> Key: XERCESJ-1602
> URL: https://issues.apache.org/jira/browse/XERCESJ-1602
> Project: Xerces2-J
> Issue Type: Bug
> Components: Serialization
> Affects Versions: 2.11.0
> Environment: java version "1.6.0_24"
> Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
> Java HotSpot(TM) Client VM (build 19.1-b02, mixed mode, sharing)
> Reporter: Nasir Hussain
> Priority: Critical
> Attachments: XercesTest.java
>
>
> when we try to serialize iframe element such as <iframe frameborder="0"
> height="250" src="http://www.youtube.com/embed/w2CsEUn4ZuU"
> width="418"></iframe>
> The serialized output is:
> <iframe frameborder="0" height="250"
> src="http://www.youtube.com/embed/w2CsEUn4ZuU" width="418" />
> This is invalid html after serialization, iframe element must be closed using
> '</iframe>' tag not by '/>'
> The sample code for reproducing this problem is attached on the issue.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]