jasperreports icon indicating copy to clipboard operation
jasperreports copied to clipboard

Breakline dissapear on <div> from 6.19.0 into html-styled text field

Open colas74 opened this issue 3 years ago • 1 comments

Hello, When I updating jasper version in my java project, I think I found a potential bug or breaking change: Before version 6.19.0, in Textfield with HTML styling, a breakline was created from each div tag in accordance with HTML syntax.

Example: According this simple template: image And this simple HTML:

Line 1
<div>Line 2</div>
<div>Line 3</div>

When I merge this template with html text using version 6.18.1, there is the result: image

But if I use version above 6.18.1, the result is widely different: image

When I look changelog of 6.19.0, I tried to use 6.19.0 and some old libs from 6.18.1, but no changes at all, it seems that this bug is not throwing from <dependency> libs.

I make a minimal reproduction project: minimal-reproduction-eclipse-project.zip

  1. Import into eclipse
  2. run Main class and look at the console where is the exported PDF path
  3. open PDF and notice that HTML text is correct
  4. go into pom.xml and use jasperreports version above 6.18.1
  5. re-run Main and open exported PDF to see the problem

colas74 avatar Sep 13 '22 07:09 colas74

same here and can't find anything related in releases notes : image

cc/ @teodord apologize to make noise here but It seems this commit https://github.com/TIBCOSoftware/jasperreports/commit/2c61765f9ea36651338182b1dd5e1490223b3833 change behavior? little out of scope to me and can't find what changed

elvisbegovic avatar Sep 15 '22 07:09 elvisbegovic

It looks like that hapens also with <p> tags, 6.19.x onwards

guilhermoMetaway avatar Oct 06 '22 19:10 guilhermoMetaway

This seems to be a regression caused by the changes in the html markup processor when we added support for bulleted and numbered lists. The changes are extensive and investigation needs more time.

Thank you, Teodor

teodord avatar Oct 12 '22 18:10 teodord

just for information, thanks to @colas74 , I succeed to reproduce the bug with his minimal-reproduction-eclipse-project.zip

elvisbegovic avatar Oct 21 '22 07:10 elvisbegovic

hi @teodord did u have the chance to check whats happening here, thx

elvisbegovic avatar Jan 10 '23 13:01 elvisbegovic