-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Textarea Macro Parameter Not Rendering HTML Markup #6286
Comments
Thanks @bkclerke - I can reproduce the error. Now to find the cause... 🙈 |
@bkclerke the macro parameter value is stored encoded and hence when you use the PS:Not a good one, but might able to help you until the bug is resolved. I couldn't manage to get the backoffice showing the form render but the webpage shows it right. Hope this helps. |
It looks like the attribute values need to be decoded in either |
The thing I'm afraid of now is when we do fix this that workarounds like the one above are going to break your site(s) 🤔 Or maybe double-decoding could work fine. Not sure. |
@nul800sebastiaan double decoding works, doesn't break. If it doesn't find anything to decode,it just returns the string as is. |
That depends what the original parameter value was. If it was HTML containing encoded things, double decoding could break it. It could also be a breaking change if people are unknowingly relying on the HTML encoding for other parameters that don't contain HTML. You might have written |
Thank you!! && @gopkumr thank you for the work around! I've actually hard coded the form for now since the site is launching on Tuesday. I'll definitely be keeping an eye out for fixes though, I plan to upgrade the site and I can add this macro back in for future features. :) |
Hiya @bkclerke, Just wanted to let you know that we noticed that this issue got a bit stale and might not be relevant any more. We will close this issue for now but we're happy to open it up again if you think it's still relevant (for example: it's a feature request that's not yet implemented, or it's a bug that's not yet been fixed). To open it this issue up again, you can write For example:
This will reopen the issue in the next few hours. Thanks, from your friendly Umbraco GitHub bot 🤖 🙂 |
In Umbraco v8, I am inserting a macro into the grid editor.
I am using a macro to embed a hubspot form code into a parameter that is a textarea called
embed
.The macro itself just renders the embed code in the parameter like so:
@Html.Raw(Model.MacroParameters["embed"])
The output of this is literally printing the html markup that I put into the macro parameter.
If I output just the parameter without
Html.Raw
then I get the decoded markup printed out. (&
instead of "&")When I tested just entering this macro into the RTE, the macro disappears on save.
I was able to do this in previous versions of Umbraco just fine but it seems that I can no longer do this in v8. I posted this on our as well.
This item has been added to our backlog AB#2540
The text was updated successfully, but these errors were encountered: