Copied to clipboard

Flag this post as spam?

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


  • Dan 12 posts 81 karma points
    Mar 01, 2024 @ 22:54
    Dan
    0

    richtexteditor stripping out attributes with certain values

    I'm running into an issue where one of my content editors is trying to embed an object into a richtexteditor. object and param elements are in the allowed list. However, one of the params has a name attribute set to "name" whenever name="name", that whole attribute is removed. This is causing the javascript to not function properly since it can't find that param with name equal to "name". I'm guessing this is a tinyMCE issue with sanitization. How do I get it to not remove the attribute?

    This is running on Umbraco 13.1.1

  • Huw Reddick 1929 posts 6717 karma points MVP 2x c-trib
    Mar 02, 2024 @ 17:21
    Huw Reddick
    0

    could you post an example of the object you are trying to add to the RTE and I will have a look

  • Dan 12 posts 81 karma points
    Mar 04, 2024 @ 13:14
    Dan
    0
    <div class='tableauPlaceholder' id='viz1709557847841' style='position: relative'><noscript><a href='#'><img alt=' '
                    src='https:&#47;&#47;public.tableau.com&#47;static&#47;images&#47;20&#47;2023-24FAFSATracker&#47;FAFSATracker-All&#47;1_rss.png'
                    style='border: none' /></a></noscript><object class='tableauViz' style='display:none;'>
            <param name='host_url' value='https%3A%2F%2Fpublic.tableau.com%2F' />
            <param name='embed_code_version' value='3' />
            <param name='site_root' value='' />
            <param name='name' value='2023-24FAFSATracker&#47;FAFSATracker-All' />
            <param name='tabs' value='yes' />
            <param name='toolbar' value='yes' />
            <param name='static_image'
                value='https:&#47;&#47;public.tableau.com&#47;static&#47;images&#47;20&#47;2023-24FAFSATracker&#47;FAFSATracker-All&#47;1.png' />
            <param name='animate_transition' value='yes' />
            <param name='display_static_image' value='yes' />
            <param name='display_spinner' value='yes' />
            <param name='display_overlay' value='yes' />
            <param name='display_count' value='yes' />
            <param name='language' value='en-US' />
        </object></div>
    

    The param with name="name" is the one that I'm having trouble with. It removes the name attribute if the value is "name".

  • Huw Reddick 1929 posts 6717 karma points MVP 2x c-trib
    Mar 04, 2024 @ 14:18
    Huw Reddick
    0

    Hi Dan,

    I think that you should raise this as a bug on GitHub. In Umbraco 10 it does not strip it if name='name' however in 12 and 13 it appears that it does strip out the name attribute if it's value equals 'name'

  • Dan 12 posts 81 karma points
    Mar 04, 2024 @ 14:29
    Dan
    0

    That makes sense. We used this same object before with no problem. But when it was added to the site, we were probably running Umbraco 10. I have a work around to get it working for now. I used our script element to inject the html object.

Please Sign in or register to post replies

Write your reply to:

Draft