Copied to clipboard

Flag this post as spam?

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


  • Profiterole 232 posts 264 karma points
    Sep 27, 2011 @ 21:06
    Profiterole
    0

    Quotation marks and line breaks

    I have two similar problem with Contour.

    1) In a form with a textbox multiple, all the line breaks are erased.

       For instance, if I write My name : Simon (then I do an "enter")

                                         My job : teacher

    Contour will render this as a line with no <br> between Simon and My job.

    2) I think this might be related to the first problem. If I cite someone and put quotation marks in my textbox, it will render as html code &quot;.

     

    Help me please!

    Simon

  • Tim 1193 posts 2675 karma points MVP 4x c-trib
    Sep 28, 2011 @ 18:41
    Tim
    1

    The breaks are there, they're just not displayed, as HTML doesn't treat a carriage return as a <br/>. There is a function in the umbraco XSLT library that will do that for you if you want to add them back in for display. Quotations will render as &quot; because they're stored in XSLT, which HTML encodes HTML entities (Like ") to their HTML equivalent. You can disable this when writing out the field in XSLT by using the disable-output-escaping="yes" option on your value-of element!

    How are you trying to display the text entered in the field? In an email, or on a page?

  • Profiterole 232 posts 264 karma points
    Sep 28, 2011 @ 18:50
    Profiterole
    0

    Oh... I'm sorry... I'm aware of and I tried disable output escaping, but in the wrong xslt.

    As for umbraco replacebreakline, it's a discovery and it works like a charm! Thank you for your help Tim!

Please Sign in or register to post replies

Write your reply to:

Draft