Problem/Motivation
The Visual Inline comparison plugin uses the HTML Purifier library to purify the left and right revision before comparing them. It uses the HTML Purifier PHP library to do that, which by default is configured to strip out all IDs. This causes a problem when there's CSS styling or functionality that relies on the IDs. The IDs are stripped by default to help avoid HTML validation issues (if that's your goal with using HTML purifier), but ... that's not our goal here. I'm actually not entirely certain why we use HTML Purifier at all, but might as well tweak it to be less invasive.
Proposed resolution
Create a new config object for HTML Purifier, configure it to allow HTML IDs, and configure the HTML Diff object to use that configuration.
Wait until #3226910: Visual inline diff view strips out HTML5 elements is resolved first since they both deal with the same code and that's a bigger priority IMO.
Comments