Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • mike_h 25 posts 49 karma points
    Jan 20, 2012 @ 10:11
    mike_h
    0

    Less Than & Greater Than

    Hi,

    I’ve come across an issue with the PDF creator where it breaks when the richtext area contains &lt; and &gt; entities, these are being inserted by the TinyMCE for the ‘<’ and ‘>’ characters, do you know of any way of working around this?

    Thanks,

    Mike

  • Darren Ferguson 1022 posts 3259 karma points MVP c-trib
    Jan 20, 2012 @ 10:39
    Darren Ferguson
    0

    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.

  • mike_h 25 posts 49 karma points
    Jan 20, 2012 @ 11:30
    mike_h
    0

    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

     

  • Darren Ferguson 1022 posts 3259 karma points MVP c-trib
    Jan 20, 2012 @ 13:39
    Darren Ferguson
    0

    Hi Mike, You could look at using the Exslt string replace function before passing the value into the extension function.

    Thanks.

  • mike_h 25 posts 49 karma points
    Jan 20, 2012 @ 16:45
    mike_h
    0

    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 &lt; and &gt; entities?

    Thanks

     

  • Darren Ferguson 1022 posts 3259 karma points MVP c-trib
    Jan 20, 2012 @ 16:52
    Darren Ferguson
    0

    It just loads the HTML from the RTE as an XML document so you can parse it with XSL-FO.

    &lt; &gt; are obviously undeclared entities.

    Do you need to keep them, or can you just remove them altogether?

  • mike_h 25 posts 49 karma points
    Jan 20, 2012 @ 17:01
    mike_h
    0

    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 &gt; &lt; and &nbsp;

    Thanks

     

  • Darren Ferguson 1022 posts 3259 karma points MVP c-trib
    Jan 21, 2012 @ 11:05
    Darren Ferguson
    0

    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

  • Darren Ferguson 1022 posts 3259 karma points MVP c-trib
    Jan 21, 2012 @ 11:31
    Darren Ferguson
    0

    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.

Please Sign in or register to post replies

Write your reply to:

Draft