Copied to clipboard

Flag this post as spam?

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


  • Brett Spencer 88 posts 258 karma points
    Mar 19, 2021 @ 19:22
    Brett Spencer
    0

    Umbraco 7 to 8 Migration TinyMCE Changing links and Stripping img "src"

    TinyMCE has changed link href address to javascript object instead of working link AND has stripped out all of the image src urls.

    I have not found any other references to this happening to anyone other than way back during version 4 issues - which don't apply. I'm a little worried that I cannot find anyone with this same issue and known fix.

    Here is an example of the old and the new:

    Old

    <a rel="noopener noreferrer" data-udi="umb://media/54c64d58053e440d980f3f8f58a696b3" href="/media/1425/form-direct-deposit.pdf" target="_blank" title="Form - Direct Deposit.pdf">
    <img style="width: 136px; height: 122px;" src="/media/1445/bacs-form.png?width=136&amp;height=122" alt="" data-udi="umb://media/20fff2e07817448a8e42b461e193bc44" />
    

     

    New

    <a rel="noopener noreferrer" data-udi="umb://media/54c64d58053e440d980f3f8f58a696b3" href="/{localLink:umb://media/54c64d58053e440d980f3f8f58a696b3}" target="_blank" title="Form - Direct Deposit.pdf">
    <img style="width: 136px; height: 122px;" src="/?width=136&amp;height=122" alt="" data-udi="umb://media/20fff2e07817448a8e42b461e193bc44" />
    

    If I just copy and past the old code to the new, I at least get the correct link href url but the image src keeps getting stripped! I'd rather not have to copy and paste everything as the content owners have a lot of pages and info using this control.

  • Brett Spencer 88 posts 258 karma points
    Mar 24, 2021 @ 17:26
    Brett Spencer
    0

    If someone could please explain to me why the data-udi attribute is being added, that would be wonderful. This is the cause of the problem.

    When removing the data-udi attributes from both the "anchor" and "image" elements the respective elements keep their href and src urls without them being stripped upon save.

    So I am forced to overwrite all of the existing version 8 code blocks with the data-udi attributes removed from the version 7 and save and publish with success.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies