I’ve
come across an issue with the PDF creator where it breaks when the richtext
area contains < and > entities, these are being inserted by the
TinyMCE for the ‘<’ and ‘>’ characters, do you know of any way of working
around this?
I'm using version 1, the FO output is done with XSLT. Is it possible to replace the entities with their numeric equivalents in the XSLT or does this need to be done by TinyMCE? If so how can this be done?
I've tried a number of things such as replacing the entities with their numeric equivalents but nothing seems to work, the minute I remove the < and > characters everything works OK. What exacrly does the RteToHtml method do, could I replace it with my own xslt extension which could replace the < and > entities?
I need to keep the entities as there's lots of content with them. I even tried setting the TinyMCE to encode entities to numeric but found out that it does it for everything except for the standard entities > < and
Hi Mike - let me have a play and figure out the solution - it may be that I need to make a bug fix, in which case you'd need to upgrade to PDF creator 2.0.
Less Than & Greater Than
Hi,
I’ve come across an issue with the PDF creator where it breaks when the richtext area contains < and > entities, these are being inserted by the TinyMCE for the ‘<’ and ‘>’ characters, do you know of any way of working around this?
Thanks,
Mike
Hi Mike - it is because the contents of the rich text area is loaded as an XML document by the helper method - so it can be parsed as XML.
My suggestion would be to replace those entities with their numeric equivalents.
Which version of PDF creator are you using - and do you output your FO with Razor or XSLT?
Thanks.
Hi Darren,
I'm using version 1, the FO output is done with XSLT. Is it possible to replace the entities with their numeric equivalents in the XSLT or does this need to be done by TinyMCE? If so how can this be done?
Thanks
Hi Mike, You could look at using the Exslt string replace function before passing the value into the extension function.
Thanks.
Hi Darren,
I've tried a number of things such as replacing the entities with their numeric equivalents but nothing seems to work, the minute I remove the < and > characters everything works OK. What exacrly does the RteToHtml method do, could I replace it with my own xslt extension which could replace the < and > entities?
Thanks
It just loads the HTML from the RTE as an XML document so you can parse it with XSL-FO.
< > are obviously undeclared entities.
Do you need to keep them, or can you just remove them altogether?
I need to keep the entities as there's lots of content with them. I even tried setting the TinyMCE to encode entities to numeric but found out that it does it for everything except for the standard entities > < and
Thanks
Hi Mike - let me have a play and figure out the solution - it may be that I need to make a bug fix, in which case you'd need to upgrade to PDF creator 2.0.
I'll let you know once I've had a look.
Thanks
Hi Mike - sorry i see the issue now - it is an issue with PDF creator.
I will be able to create a fix in the next few days but you'll need to upgrade to v 2.0 to get the fix.
It is quite a simple process to do so.
I'll keep you posted.
Thanks.
is working on a reply...