diff --git a/src/main/java/be/quodlibet/boxable/TableCell.java b/src/main/java/be/quodlibet/boxable/TableCell.java index e750bb14..a5145c4b 100644 --- a/src/main/java/be/quodlibet/boxable/TableCell.java +++ b/src/main/java/be/quodlibet/boxable/TableCell.java @@ -170,10 +170,10 @@ private void createInnerTable(float tableWidth, Document document, PDPage curren if (col.attr("colspan") != null && !col.attr("colspan").isEmpty()) { Cell cell = (Cell) row.createCell( tableWidth / columnsSize * Integer.parseInt(col.attr("colspan")) / row.getWidth() * 100, - col.html().replace("&", "&")); + col.html().replace("&", "&").replace(">", ">").replace("<", "<")); } else { Cell cell = (Cell) row.createCell(tableWidth / columnsSize / row.getWidth() * 100, - col.html().replace("&", "&")); + col.html().replace("&", "&").replace(">", ">").replace("<", "<")); } } yStart -= row.getHeight(); diff --git a/src/test/java/be/quodlibet/boxable/TableTest.java b/src/test/java/be/quodlibet/boxable/TableTest.java index 89c74a69..8c9ebc62 100644 --- a/src/test/java/be/quodlibet/boxable/TableTest.java +++ b/src/test/java/be/quodlibet/boxable/TableTest.java @@ -1055,7 +1055,7 @@ public void SampleTest10() throws IOException { cell2.setFontSize(6); Cell cell3 = row2.createTableCell((100 / 3f), - "
Hello Hello Hello Hello Hello Hello Hello it's meb1
a1b1
a1b1 b1 b1 b1 b1 b1 b1 b1
a1b1
a1b1
a1b1
a1b1
a1b1
a1b1
", + "
Hello->Hello<-Hello & Hello Hello Hello Hello it's meb1
a1b1
a1b1 b1 b1 b1 b1 b1 b1 b1
a1b1
a1b1
a1b1
a1b1
a1b1
a1b1
", doc, page, yStart, pageBottomMargin, margin); cell3.setFontSize(6);