Copied to clipboard

Flag this post as spam?

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


  • myro 7 posts 27 karma points
    Jan 15, 2010 @ 18:09
    myro
    0

    Macro Parameters, Text and Multiline Text problem: double quotes and breaklines

    Hello,

    Im running

    • umbraco v 4.0.3 (Assembly version: 1.0.3625.27276), 
    • asp.net 3.5 on windows server 2008 r2, IIS 7

    I found out that when I create a macro, and add Multiline Text parameter, the text that is insered into the parameter get truncated after a double quote.

    so if I insert into my multiline parameter a text like: hello "world" and publish the page, the text saved into the macro parameter is just hello.
    Infact, if re-edit the macro's parameter, i only see the truncated text.

    An another problem is that text insered into Multiline Text parameter desn't preserve breaklines.

    my macro's xslt:

    <xsl:output method="xml" omit-xml-declaration="yes"/>
    <xsl:variable name="Code" select="/macro/Code"/>
    <xsl:param name="currentPage"/>

    <xsl:template match="/">

     <xsl:value-of select="$Code" />

    </xsl:template>

    As you can see my xslt file does nothing special, it just prints a parameter into my page.

    Am I doing something wrong?
    Any help is really appreactiated.

    Thank you.

  • Lee Kelleher 4026 posts 15836 karma points MVP 13x admin c-trib
    Jan 15, 2010 @ 18:34
    Lee Kelleher
    0

    Hi myro,

    The value of the macro parameter needs to be HTML encoded - which the Umbraco UI usually does for you.

    If you are manually editing the value, then you will need to encode the text.  If you are not sure about the HTML encodings, there is a reference guide:

    http://www.w3schools.com/tags/ref_entities.asp

    Cheers, Lee.

  • myro 7 posts 27 karma points
    Jan 16, 2010 @ 11:32
    myro
    0

    Hello Lee,

    Thank you for your response.
    I have already tried to html encode the text, but with the same result:

    •  hello &quot;word&quot;   is truncated to  hello
    • hello &#34;word&#34;  is truncated to hello

    I really can't understand what is going wrong: after publishing the page, all the text  after &quot;  or &#34; is lost.
    Is there maybe a configuration that should be set?

     

     

     

     

  • myro 7 posts 27 karma points
    Jan 16, 2010 @ 20:00
    myro
    0

    Could anybody please, just try to paste " hello &quot;word&quot;  "  into a text/multiline text macro's parameter and publish the page to see if the same problem happens?

    Thank you

  • Matt Nolan 45 posts 65 karma points
    Apr 04, 2012 @ 17:56
    Matt Nolan
    0

    Hi myro,

    I have the same issue, did you ever find a solution?

    Thanks,

    Matt

  • Thomas Egebrand Gram 63 posts 138 karma points
    Sep 21, 2012 @ 14:29
    Thomas Egebrand Gram
    0

    Hello!

    Experiencing the same problem - will post if i figure something out.

    // Thomas G

Please Sign in or register to post replies

Write your reply to:

Draft