Closed PascalSchumacher closed 5 years ago
Looks like this was caused by the changes for https://github.com/jOOQ/jOOX/pull/150 / https://github.com/jOOQ/jOOX/issues/152 in https://github.com/jOOQ/jOOX/blob/master/jOOX/src/main/java/org/joox/Util.java#L103 This change cause a SaxException
to be thrown for content containing an ampersand. The exception is swallowed in https://github.com/jOOQ/jOOX/blob/master/jOOX/src/main/java/org/joox/Util.java#L143 but the com.sun.org.apache.xerces.internal.util.DefaultErrorHandler
writes to error out.
The error output can be suppressed by setting the error handler of the DocumentBuilder
used by jOOX to null
, but avoiding the exception somehow would be a better.
Any ideas/hints how to fix this?
Thanks in advance, Pascal
Thank you very much for your report. Unfortunately, I cannot reproduce this:
When a Match with an ampersand in content is created a message like [Fatal Error] :1:11: The entity name must immediately follow the '&' in the entity reference. is printed to error out.
Running your test doesn't yield any error messages on my machine. How can this be reproduced?
My mistake - I had checked this with version 1.2.0
Thanks again for your report. This is fixed for jOOX 1.7.0. Currently, there haven't been enough changes to justify a release.
Moving to 1.6.2 as we're getting more reports (e.g. #163), which might make a timely release more probable
Version 1.6.2 has been released including a fix for this issue. It will be available from Maven Central shortly.
Thanks!
Sadly is not on maven central yet and https://github.com/jOOQ/jOOX/releases also does not display it.
Luckily it is! https://search.maven.org/search?q=joox
For some reason I was looking for 1.6.3
. My mistake.
Sorry and thanks!
Expected behavior and actual behavior:
When a
Match
with an ampersand in content is created a message like[Fatal Error] :1:11: The entity name must immediately follow the '&' in the entity reference.
is printed to error out.Functionally is not affected. The document is created and is well formed.
A simplified test to reproduce the problem:
Versions: