abdera-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christine Koppelt (JIRA)" <j...@apache.org>
Subject [jira] Updated: (ABDERA-243) Extra characters generated for entities in XHTML
Date Thu, 03 Feb 2011 18:12:29 GMT

     [ https://issues.apache.org/jira/browse/ABDERA-243?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Christine Koppelt updated ABDERA-243:
-------------------------------------

    Fix Version/s: 1.1.2

> Extra characters generated for entities in XHTML
> ------------------------------------------------
>
>                 Key: ABDERA-243
>                 URL: https://issues.apache.org/jira/browse/ABDERA-243
>             Project: Abdera
>          Issue Type: Bug
>    Affects Versions: 0.4.0
>         Environment: Windows XP
>            Reporter: Jon Hewitt
>             Fix For: 1.1.2
>
>
> Run the following program.  Note that the entities (&#x200; &#x201) are translated
to the correct characters but an additional character  (the euro sign and '?') follows each
correct character:
> Output:
>      <p xmlns="http://www.w3.org/2005/Atom">This is simple XHTML È€È? contained
within a xhtml:div tag.</p>    
> import java.io.ByteArrayInputStream;
> import java.io.InputStream;
> import org.apache.abdera.Abdera;
> import org.apache.abdera.model.Document;
> import org.apache.abdera.model.Entry;
> public class Parser {
> 	public static void main(String args[]) {
> 		try {
> 			String atomText = "<entry xmlns=\"http://www.w3.org/2005/Atom\"> "
> 					+ "  <title>Item</title> "
> 					+ "    <content type=\"xhtml\" xmlns:xhtml = \"http://www.w3.org/1999/xhtml\"
> "
> 					+ "   <xhtml:div> "
> 					+ "    <p>This is simple XHTML &#x200;&#x201; contained within a xhtml:div
tag.</p> "
> 					+ "   </xhtml:div> " + "  </content> " + "</entry>";
> 			InputStream is = new ByteArrayInputStream(atomText.getBytes("UTF-8"));
> 			Document<Entry> entryDocument = Abdera.getNewParser().parse(is);
> 			Entry entry = entryDocument.getRoot();
> 			System.out.println(entry.getContent());
> 		} catch (Throwable t) {
> 			t.printStackTrace();
> 		}
> 	}
> }

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

Mime
View raw message