U4-6228 - RTE: invalid HTML with images

Created by Pim van Die 03 Feb 2015, 10:23:11 Updated by Shannon Deminick 22 Mar 2017, 05:11:43

Relates to: U4-5480

What did you do? Add multiple images to a page through the RTE.

What did you expect to happen? Every image have no, or an unique id. Every image have no, or a valid value for the 'rel' attribute

What actually happened?

  • Every image added through the editor gets the id '__mcenew'
  • Every image gets a int value for the 'rel' attribute (it's the id of the image I guess)
  • Those two things generate invalid HTML

Possible solution Changes in umbraco/js/umbraco.services.js

  • #5411, change id: img.attr("rel") to id: img.attr("id")
  • #5428: change rel: img.id to id: img.id
  • #5429: remove the line id: '__mcenew'
  • #5434: change var imgElm = editor.dom.get('__mcenew'); to var imgElm = editor.dom.get(img.id);

1 Attachments


Chester Loffman 26 Apr 2016, 13:04:53

I have submitted a pull request for this:




Shannon Deminick 11 May 2016, 09:03:14

This has been 'fixed' in previous versions so it doesn't output the invalid html to the front-end:


So this will have to wait till v8

Shannon Deminick 22 Mar 2017, 05:10:33

I am marking this fixed because we are now using UDIs for local links and references in the RTE.

It will continue to work with any existing INT found in the markup but when new images or links are selected they will be stored using UDIs.


Shannon Deminick 22 Mar 2017, 05:11:43

There will be data-udi instead of both rel or data-id for images

Priority: Minor

Type: Bug

State: Fixed


Difficulty: Normal


Backwards Compatible: False

Fix Submitted:

Affected versions: 7.2.1

Due in version: 7.6.0


Story Points: