You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by ji...@apache.org on 2004/04/12 23:13:52 UTC
[jira] Updated: (XERCERJ-55) HTMLSerializer serializes attributes with an empty string value incorrectly
The following issue has been updated:
Updater: Serge Knystautas (mailto:sergek@lokitech.com)
Date: Mon, 12 Apr 2004 2:13 PM
Changes:
Attachment changed from HTMLSerializer.java
---------------------------------------------------------------------
For a full history of the issue, see:
http://issues.apache.org/jira/browse/XERCERJ-55?page=history
---------------------------------------------------------------------
View the issue:
http://issues.apache.org/jira/browse/XERCERJ-55
Here is an overview of the issue:
---------------------------------------------------------------------
Key: XERCERJ-55
Summary: HTMLSerializer serializes attributes with an empty string value incorrectly
Type: Bug
Status: Resolved
Resolution: FIXED
Project: Xerces2-J
Assignee: Xerces-J Developers Mailing List
Reporter: sandor
Created: Tue, 30 Oct 2001 12:03 PM
Updated: Mon, 12 Apr 2004 2:13 PM
Environment: Operating System: All
Platform: All
Description:
Consider the following XHTML fragment:
<IMG alt="" src="some.gif"/> When this fragment is serialized as HTML, the
output is <IMG alt src="some.gif"> -- according to the HTML spec, this is not
the correct behavior. The following code snippet in HTMLSerializer is the
culprit:
// HTML: Empty values print as attribute name, no value.
// HTML: URI attributes will print unescaped
if ( value == null || value.length() == 0 )
_printer.printText( name );
(in startElement and serialize methods).
A better solution would be:
if ( value == null || value.length() == 0 )
_printer.printText( name + "=\"\"");
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org