Copied to clipboard

Flag this post as spam?

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


  • Shane 40 posts 193 karma points
    Feb 19, 2015 @ 11:20
    Shane
    0

    Macro parameter not being encoded correctly

    Hi,

    I have a macro which has a textarea parameter. The user should be allowed to enter html code in the parameter. 

    I have two installations of Umbraco 7.1.4. On the one website this works perfectly, on the other the parameter code is breaking (when entering the same piece of code in the textarea). When I view the source it looks like the first website is encoding the parameter and it works correctly. The other website is not encoding the parameter and this is causing the problem.

    Any ideas why I'm getting two different sets of behaviours? Is there a setting for this somewhere?

    Thanks

  • Sören Deger 733 posts 2844 karma points c-trib
    Feb 19, 2015 @ 11:29
    Sören Deger
    0

    Hi Shane,

    how do you render the code on your website? Do you use Html.Raw()?

     

    Best,

    Sören

  • Shane 40 posts 193 karma points
    Feb 19, 2015 @ 11:35
    Shane
    0

    Hi Sören,

    Thanks for the response. Yes I was using Html.Raw() but I think the problem is even before this stage.

    On the working site: When editing the page if I click the source button on the richtext editor I can see that the content is encoded. Clicking the macro button shows me the data I have entered correctly.

    On the broekn site: When editing the page if I click the source button on the richtext editor I can see that the content is NOT encoded. Clicking the macro button shows me the content I entered up to the first quote and then the string is broken and the rest ommitted.

    It seems that the data is being stored differently.

    Thanks

  • Sören Deger 733 posts 2844 karma points c-trib
    Feb 19, 2015 @ 11:38
    Sören Deger
    0

    Ok,maybe the validElements in your /config/tinyMceConfig.config are different. Please merge this file and check if there is any different in both websites.
     

    Best,

    Sören

  • Shane 40 posts 193 karma points
    Feb 19, 2015 @ 11:58
    Shane
    0

    Those sections are the same. 

    I actually have 3 installations and I've just noticed that two are 7.1.4 but the one in question is actually 7.0.4. I'll update and see if that fixes it.

    Thanks

  • Shane 40 posts 193 karma points
    Feb 21, 2015 @ 11:31
    Shane
    100

    I can confirm that upgrading to 7.2.1 solved this issue.

  • Sören Deger 733 posts 2844 karma points c-trib
    Feb 21, 2015 @ 12:05
    Sören Deger
    0

    Great :) Thank you for the feedback!

Please Sign in or register to post replies

Write your reply to:

Draft