Copied to clipboard

Flag this post as spam?

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


  • Olivier Vionnet 26 posts 111 karma points
    Dec 11, 2013 @ 15:07
    Olivier Vionnet
    0

    Carriage return in TextArea causing javascript error

    Contour version : 3.0.17
    Umbraco : 6.1.6
    Jquery : 1.10.2

    Hello

    I have a form with steps containing a condition to display or not a file upload field and it works fine the most of time. The data of this form can be edited at a later time.

    I've noticed in one edition a javascript issue : a TextArea is generating a javascript error and this is caused by a carriage return in this TextArea (seems not been encoded correctly ?)
    Firebug example :

    if($("#1eb5935c-8500-4686-a17d-6cf79fd00575").length == 0)
    {
    contourFieldValues["1eb5935c-8500-4686-a17d-6cf79fd00575"] = "test hello
    joo";
    }


    Between hello and joo, there is a carriage return.
    If I remove the carriage return, all goes well and the condition is working nicely.

    Does anyone have an idea of what I could do to avoid this error (not inserting a carriage return could be a solution in last resort ;) )?

    Thanks in advance

    olivier

  • Comment author was deleted

    Jan 04, 2014 @ 14:22

    Looks like a bug, needs to be fixed in Contour :) will add to issue tracker on monday

  • Olivier Vionnet 26 posts 111 karma points
    Jan 04, 2014 @ 23:38
    Olivier Vionnet
    0

    Hello Tim
    Thanks for your reply.

    I've already opened an issue on issue.umbraco.org for this problem : http://issues.umbraco.org/issue/CON-490

    Best regards

    Olivier

  • Kevin Lawrence 183 posts 350 karma points
    May 19, 2014 @ 11:50
    Kevin Lawrence
    0

    Is this fixed yet?  I'm using 3.0.19 and it doesn't appear to be!

  • Olivier Vionnet 26 posts 111 karma points
    May 19, 2014 @ 14:57
    Olivier Vionnet
    0

    I've tried on Contour 3.0.21, didn't saw this error.

  • Kevin Lawrence 183 posts 350 karma points
    May 19, 2014 @ 15:46
    Kevin Lawrence
    0

    Ok, I just checked 3.0.21 and I do get this issue, multi line text area still puts a line break in the JS.

    I've just checked Script.cshtml and there doesn't seem to any change when referencing the record value, so I don't think it's been fixed.

  • Olivier Vionnet 26 posts 111 karma points
    May 19, 2014 @ 20:50
    Olivier Vionnet
    0

    you're right, the bug is still present.

    I've forgot to put a step when I've tested

Please Sign in or register to post replies

Write your reply to:

Draft