[ http://issues.apache.org/jira/browse/XALANJ-611?page=all ]

Brian Minchau updated XALANJ-611:
---------------------------------

    Attachment: patch.to.ToHTMLStream.txt

Attaching a patch to ToHTMLStream.java that modifies its writeAttrURI() method 
to special case a literal '&' just like it special cases a quotation character.

The patch writes out "&" for a literal '&' in an HTML URI attribute value.

Henry Zongaro's sample XSL is essentially this:
<?xml version="1.0"?>
<xsl:stylesheet 
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
  version="1.0">
<xsl:template match="/">
  <HTML><a href="http://example.org/part&amp;amp;parcel"/></HTML>
</xsl:template>
</xsl:stylesheet>

The original output is:
<HTML>
<a href="http://example.org/part&amp;parcel";></a>
</HTML>

With the patch the output is:
<HTML>
<a href="http://example.org/part&amp;amp;parcel";></a>
</HTML>

> HTML output serializes ampersand as "&" in HREF attributes
> ----------------------------------------------------------
>
>          Key: XALANJ-611
>          URL: http://issues.apache.org/jira/browse/XALANJ-611
>      Project: XalanJ2
>         Type: Bug
>   Components: Serialization
>     Versions: Latest Development Code
>  Environment: Operating System: All
> Platform: All
>     Reporter: julian.reschke
>     Assignee: Xalan Developers Mailing List
>  Attachments: patch.to.ToHTMLStream.txt
>
> Using the HTML output method, an ampersand is serialized as "&". It should 
> be "&amp;".

-- 
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
-
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]

Reply via email to