readium / readium-js-viewer

👁 ReadiumJS viewer: default web app for Readium.js library
BSD 3-Clause "New" or "Revised" License
551 stars 186 forks source link

Issues with <a> tags getting removed in Readium Js viewer reader. #742

Open 575755 opened 4 years ago

575755 commented 4 years ago

Hi, We are facing issues with highlight feature when the migrated data coming up.

Please find the examples of old reader and new reader Xpath with the decoded details for same text below:

Old Reader:

L2h0bWwvYm9keS9wWzJdL2E6OnBhcmVudE5vZGUsL2h0bWwvYm9keS9wWzJdL2E6OnBhcmVudE5vZGUsMTgsMjc=

/html/body/p[2]/a::parentNode,/html/body/p[2]/a::parentNode,18,27

New Reader: L2h0bWwvYm9keS9wWzNdOjpwYXJlbnROb2RlLC9odG1sL2JvZHkvcFszXTo6cGFyZW50Tm9kZSwxOCwyNw==

/html/body/p[3]::parentNode,/html/body/p[3]::parentNode,18,27

Capture1_missing_a_tag Capture2_with_a_tag
575755 commented 4 years ago

Hi, Please take this issue as a priority .

danielweck commented 4 years ago

When a HTML tag is present in the raw source, but missing in the computed DOM, this may be a sign that there is a mismatch between XHTML and HTML (e.g. self-closing tags). Just a thought.

575755 commented 4 years ago

Hi Daniel,

We have only (.html) file for the physical content .In the below we have added two screenshots one is from browser perspective physical file and another one is from our code-base physical file .So we have compared both the file and tried to make changes in our code-base physical file as you suggested to check with the self-closing tags in the comment .

img1_with_a_tag img2_missing_A_tag

In that file one tag is given as self-closed tag. So we tried like by changing pre-closed tag as normal .. tag . after changing we are getting like this:

img1 img2

After changing all things also still same issue we are facing. So, We are not getting whether it is adding a duplicate tag or removing tag in the DOM structure in this particular issue. Because only for this tag Xpath is coming different.

575755 commented 3 years ago

Hi Daniel,

We have attached the screenshot of