Copied to clipboard

Flag this post as spam?

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


  • mattou07 15 posts 109 karma points MVP 3x c-trib
    Sep 10, 2020 @ 16:05
    mattou07
    0

    Umbraco 8.5.3 showing data-udi attribute in HTML

    Noticed that my blog is showing the udi attributes for media in my HTML. This was fixed from looking at this Github issue: https://github.com/umbraco/Umbraco-CMS/issues/2921

    Maybe I misconfigured something?

    Url: https://mattou07.net/posts/a-basic-front-end-build-for-umbraco-or-any-web-application/

    Additionally my Macros are leaving html comments

    <!-- <?UMBRACO_MACRO macroAlias="codeInserter" and leaving classes in the divs:

    <div class="umb-macro-holder codeInserter umb-macro-mce_2 mceNonEditable">
    

    Any ideas on how I can hide these? Let me know what additional details are needed. Thanks!

  • emi 2 posts 72 karma points
    Apr 20, 2021 @ 17:52
    emi
    0

    having the same udi issue in 7.12.5 — did you find a solution, mattou07?

  • mattou07 15 posts 109 karma points MVP 3x c-trib
    Sep 23, 2021 @ 09:57
    mattou07
    1

    I have not emi :(

  • Lucas Michaelsen 32 posts 233 karma points
    Sep 23, 2021 @ 12:54
    Lucas Michaelsen
    1

    Hallo Mattou07

    I can see you a using a Macro, is it a custom made one?`

    Anyhow, i have the same problem on my 8.15.x solution, where my Custom RTE macro showed the links as UDI data attr.

    The solution to fix it is to let the MacroParameter run toughte the htmldecoder and then EnsureInternalLinks, like this

    @Html.Raw(htmlLocalLinkParser.EnsureInternalLinks(HttpUtility.HtmlDecode(Model.MacroParameters["content"].ToString())))
    

    Emi for umbraco 7 it is looking like this:

    @using Umbraco.Web.Templates
    
    string html = Templates.TemplateUtilities.ParseInternalLinks(rteGridValue, UmbracoContext.Current.UrlProvider);
    
    @Html.Raw(html)
    

    hope i works for both of you

  • emi 2 posts 72 karma points
    Sep 23, 2021 @ 13:16
    emi
    0

    Thanks so much Lucas, I'll follow up when I've had the chance to test!

Please Sign in or register to post replies

Write your reply to:

Draft