0

I work with jsoup1.6.2.jar. Consider the following code.

String data = "<textarea><table><tr><td>Look at the following elements</td></tr></table></textarea>"; 
Document doc = Jsoup.parse(data); 
System.out.println(doc);  

Output:

<html>  <head></head>  <body>   <textarea>&lt;table&gt;&lt;tr&gt;&lt;td&gt;Look at the following elements&lt;/td&lt;/tr&lt;/table</textarea>  </body> </html>  

Why is it missing the &gt for self closing tags? I encountered this problem only with textarea so far. Can anyone help me with this?

Quentin
  • 914,110
  • 126
  • 1,211
  • 1,335
Divakar
  • 21
  • 3

1 Answers1

1

You can't put a table inside a text area. There's your mistake