Copied to clipboard

Flag this post as spam?

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


  • Claushingebjerg 939 posts 2574 karma points
    Aug 30, 2011 @ 14:03
    Claushingebjerg
    0

    Reference to undeclared entity 'nbsp'

    Hi 

    first off, the package works great. I have a problem though.
    When rendering output from the RTE i sometimes get an error 

    Reference to undeclared entity 'nbsp'

    When checking the output there is  's in the source. Deleting them solves the problem. But thats not really a solution.

    I dont really get why it happens, since 

    <!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp "&#x00A0;"> ]>

    is declared... 

     

    Help please :)

  • Darren Ferguson 1022 posts 3259 karma points MVP c-trib
    Aug 30, 2011 @ 15:50
    Darren Ferguson
    0

    Hi - The document that the error refers to isn't your stylesheet but an intermediate document that is used by the package when working with Rich Text editors.

    Right now that document wraps the RTE content in a root node and parses it.

    With the current version of my software you'll need to remove all non-breaking spaces.

    This is something I may address in a future version.

    Thanks.

     

  • Claushingebjerg 939 posts 2574 karma points
    Aug 30, 2011 @ 15:58
    Claushingebjerg
    0

    So, is there a way to do remove the "&nbsp;" automatically through XSLT, or are you telling me to do it manually for each instance?

    Not really a viable option, since its a client site, and they complain about pages not rendering as PDF's...

     

  • Darren Ferguson 1022 posts 3259 karma points MVP c-trib
    Aug 30, 2011 @ 16:03
    Darren Ferguson
    0

    There isn't a way to remove these entities with XSLT as the exception you see is thrown prior to the XSLT transformation - I recommend that you configure Tiny MCE to disallow non breaking spaces.

    You could achieve this pretty quickly by using setting entity_encoding to numeric in ~/config/tinyMceConfig.config

    Any solution other than having Tiny MCE parse/strip the entities would require a code change in the product - an I'm on vacation about 2 hours from now!

    Thanks.

Please Sign in or register to post replies

Write your reply to:

Draft