Copied to clipboard

Flag this post as spam?

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


  • Steve Bayliss 2 posts 22 karma points
    Oct 31, 2011 @ 15:20
    Steve Bayliss
    0

    4.7.1 HTML Special Characters Encoding in Macro Parameter

    I have a Macro (ASP.Net User Control) which takes two parameters DocumentID (number) and ExpandingButtonText (text), the macro has been enabled for "User in editor".

    Below is an example of the Macro which has been used in a TinyMCE rich text editor.

    <div class="umbMacroHolder" title="This is rendered content from macro" onresizestart="return false;" umbpageid="1879" umbversionid="73e4f36d-f2f2-4d8b-8cde-b79a56fb55a5" ismacro="true" umb_expandingbuttontext="Click here to read the\r\nCharity Car Agreement >>" umb_macroalias="ExpandingPanel" umb_documentid="1699"><!-- startUmbMacro --><span style="color: green;"><strong>ExpandingPanel</strong><br />No macro content available for WYSIWYG editing</span><!-- endUmbMacro --></div>

    The thing to take note of is the > characters in the ExpandingButtonText (bad practice I know but bare with me...). In 4.6.0 this worked exactly as required, the two parameters were passed through to the Macro and everything operates as expected, it seems like something has changed in 4.7.1 (and presumably 4.7.0).

    If I enter the macro as above into the RichTextEditor HTML panel and click update its all happy (i.e. if I view the HTML again it is in there) but upon saving the node it appears like the Umbraco back end has decided that it doesn't like HTML characters any more and removes the Macro parameter.

    I thought maybe I could solve this by HTML encoding the character, so If I change the above to &gt; and click update in the TinyMCE HTML panel and reopen it then the character has been decoded back to a > and hence why I try to save the node it strips out the parameter again.

    I rolled back the upgrade to 4.6.1 but don't really want to be stuck on this version forever. I suspect this might be fixed by playing with the TinyMCE settings but couldnt sort anything in there.

    Has anyone had this problem or have any ideas on how to sort this?

     

Please Sign in or register to post replies

Write your reply to:

Draft