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 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.
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.
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.
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
Hi Shane,
how do you render the code on your website? Do you use Html.Raw()?
Best,
Sören
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
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
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
I can confirm that upgrading to 7.2.1 solved this issue.
Great :) Thank you for the feedback!
is working on a reply...