Copied to clipboard

Flag this post as spam?

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


  • javier 64 posts 84 karma points
    Mar 24, 2011 @ 15:02
    javier
    0

    umbraco.library:HtmlEncode returns rare characters

    Hi guys!

    i have a text under <p></p> called from a macro

    this is what i get:

    &lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipiscing
    elit. Cras dignissim, ligula sit amet pharetra tempus, felis arcu
    venenatis diam, sit amet viverra arcu sapien et orci. Aliquam
    mattis, mi in convallis mollis, lectus augue posuere lorem, ut
    consectetur augue metus porttitor velit. Quisque nunc lacus,
    lacinia nec adipiscing tincidunt, laoreet nec eros. Proin odio leo,
    blandit eu vehicula vitae, fringilla nec felis. Fusce magna dolor,
    fermentum sit amet porttitor bibendum, bibendum consequat odio.
    Phasellus vel mi vitae risus ultricies pharetra ac nec diam. Donec
    feugiat convallis felis egestas placerat. Phasellus euismod ligula
    non augue faucibus posuere. Ut ornare aliquet tellus sed faucibus.
    Praesent porttitor facilisis odio, eget congue nisl vestibulum id.
    Phasellus aliquam dapibus nulla sed vulputate. Nullam orci metus,
    vehicula id accumsan eget, imperdiet sit amet lorem. Nulla nisl
    lorem, lobortis nec vulputate id, ultrices sit amet mauris.
    Phasellus porta sagittis malesuada.&lt;/p&gt;
    
    &lt;p&gt;Suspendisse in neque ut turpis vulputate tempus. In in magna
    volutpat libero semper eleifend sit amet nec massa. Proin quis
    mauris purus. Donec gravida lectus et diam malesuada eleifend.
    Maecenas a tellus enim, ut porttitor odio. Etiam dapibus convallis
    risus, vel pellentesque justo varius id. Donec viverra mi ut ipsum
    dapibus in cursus nisi egestas. Duis id orci ipsum, sollicitudin
    vehicula turpis. Phasellus a mauris metus, semper rhoncus ligula.
    Quisque vel velit ligula, sit amet mattis lorem. Pellentesque ut
    felis mauris, pharetra cursus nunc. Suspendisse ac rutrum turpis.
    Nulla tempor eleifend leo, et auctor diam dignissim et.&lt;/p&gt;
    

    What are this symbols? .&lt;/p&gt; &lt;p&gt??

     

    thanks

    javier

  • Richard 146 posts 168 karma points
    Mar 24, 2011 @ 15:20
    Richard
    0

    That is the HTML encoded values for the angle brackets around the p tag. &lt; is < and &gt; is > (as in less than [&lt;] and greater than [&gt;]).

  • javier 64 posts 84 karma points
    Mar 25, 2011 @ 07:20
    javier
    0

    and how to ge the correct html encoding? i read them from a subnode item, like richtext format. If I dont use htmlencode i see <p></p> but dont work like "p" tags. how can i read a richt text item, and get a perfect HTML encoding?

  • javier 64 posts 84 karma points
    Mar 25, 2011 @ 07:33
    javier
    0

    Mark this reply as anwer:

    I changed this:

    <xsl:value-of select="umbraco.library:HtmlEncode($text)" />

    by:

    <xsl:value-of select="umbraco.library:Item(@id, 'bodyText')" />

    Now the richtext content return like it must be

Please Sign in or register to post replies

Write your reply to:

Draft