mendixlabs / rich-text

MOVED to:
https://github.com/mendix/widgets-resources/tree/master/packages-web/rich-text
Apache License 2.0
2 stars 8 forks source link

<br> Not XHTML-compliant (DocumentTemplate) #26

Closed kesslera closed 5 years ago

kesslera commented 5 years ago

Hi Mendixlabs Team,

I tried to use the rich text editor to produce some formatted text for PDF-Document generation. For this, I use the "Render as XHTML" option on the document template. But the document generation produces following error:

Caused by: com.mendix.systemwideinterfaces.MendixRuntimeException: Error processing XHTML
at com.mendix.documentexporter.focomponents.DynamicLabel$1.run(DynamicLabel.java:145)

Caused by: net.sf.saxon.trans.XPathException: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 278; The element type "br" must be terminated by the matching end-tag "</br>"

There should be an option to tell the rich text editor to render <br>- and other tags as self-closing tags compliant to XHTML, eg.: <br />

Andries-Smit commented 5 years ago

Dear Alexander,

Thank you for your feature request. At the moment we only support one output type. At the moment we are not planning to add any other out types.

I would recommend to create a util function to convert HTML to XHTML It might be even available in app store community commons, please have a check. Or you create one yourself. See https://stackoverflow.com/questions/5936403/html-to-xhtml-conversion-in-java

Cheers, Andries