Copied to clipboard

Flag this post as spam?

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


  • Ivan 165 posts 543 karma points
    Jun 27, 2016 @ 20:09
    Ivan
    0

    Avoid ampersand encoding in macro parameter

    Hi guys.

    Let's say I have a macro injected in RTE on the backend. The macro has a text parameter.

    If I try to put url into the parameter field: http://umbraco.com/?id=1&name=john

    The "&" sign becomes "amp;" . How to avoid that?

    I remember there was a trick with the editor config. But my case is different since I need to avoid encoding for this particular param keeping the other params intact (should be encoded as normal).

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Jun 28, 2016 @ 05:41
    Jan Skovgaard
    0

    Hi Ivan

    What does your code for the macro look like?

    Not sure it you will be able to use @Html.Raw() perhaps?

    /Jan

  • Ivan 165 posts 543 karma points
    Jun 28, 2016 @ 13:08
    Ivan
    0

    Hi Jan!

    Actually we use Umbraco to store data, not to render. So the @Html.Raw() method is not used anywhere I guess. The other system (which I don't have access to) renders data from Umbraco tables.

    Essentially I need to store decoded data in Umbraco tables. Maybe it's possible to hook up to the SaveAndPublish event and replace the "amp;" thing?

Please Sign in or register to post replies

Write your reply to:

Draft