This the main repository for RSpace: rspace-web. Check https://github.com/rspace-os/rspace-web/blob/main/DevDocs/DeveloperNotes/GettingStarted/GettingStarted.md for setup instructions.
Turns out that introducing a new pdf-printing library (flying-saucer-pdf) caused a problem with exporting some ELN documents to PDF. The problem was caused by & (ampersand) character that RSpace may try to put into PDF page header (or footer) as a part of document name, or (less likely) as a part of full name of the exporting user. Attempt to export a document that has & in the name was resulting in an error like:
Can't load the XML resource (using TrAX transformer). org.xml.sax.SAXParseException; lineNumber: 19;
columnNumber: 67; The reference to entity "in..." must end with the ';' delimiter..
After investigating, it seems that flying-saucer-pdf has a problem with interpreting html entities/chars passed through CSS 'content' attribute, which was how the header/footer generation was done. The fix applied in this PR is to use running CSS headers/footers, which allows to define content of header/footer through html fragment in '
Turns out that introducing a new pdf-printing library (
flying-saucer-pdf
) caused a problem with exporting some ELN documents to PDF. The problem was caused by & (ampersand) character that RSpace may try to put into PDF page header (or footer) as a part of document name, or (less likely) as a part of full name of the exporting user. Attempt to export a document that has&
in the name was resulting in an error like:After investigating, it seems that
' section, rather than CSS attribute in 'flying-saucer-pdf
has a problem with interpreting html entities/chars passed through CSS 'content' attribute, which was how the header/footer generation was done. The fix applied in this PR is to use running CSS headers/footers, which allows to define content of header/footer through html fragment in '