Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
575755 opened this issue Sep 17, 2020 · 5 comments
Open

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

575755 opened this issue Sep 17, 2020 · 5 comments

Comments

@575755
Copy link

575755 commented Sep 17, 2020

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

  • When we are doing a highlight in same content and same word the Xpath given by the old reader(not readium) and new
    reader is different.
  • After debugging we come to know that few elements are not coming in the new reader(Readium Js viewer)
  • In the actual physical file there were tags available in the .html file and these tags are missing in the content rendered in our new reader.
    (We have checked the elements in the developer console)

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
Copy link
Author

575755 commented Sep 18, 2020

Hi,
Please take this issue as a priority .

@danielweck
Copy link
Member

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
Copy link
Author

575755 commented Sep 21, 2020

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
Copy link
Author

575755 commented Oct 16, 2020

Hi Daniel,

We have attached the screenshot of <iframe> wherein we have "data-src" and "src" .Now we are loading an .xhtml file through data-src(attached screenshot) .However, the rendered content(screenshot attached) is not matching with our data-src content.
So help us how can we get the rendered content same as the data-src content as it is critical for our release.

data-src content1

data-src content2

rendered content

@danielweck
Copy link
Member

perhaps this explanation helps?
#747 (comment)

Another thing comes to mind (which could explain the closing tag issue): HTML vs. XHTML file extension triggers different parsing behaviour in some web browsers, when the HTTP header content-type is not available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants