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

"&" ampersand not recognized #78

Open
MathiasCimelli opened this issue Oct 3, 2022 · 3 comments
Open

"&" ampersand not recognized #78

MathiasCimelli opened this issue Oct 3, 2022 · 3 comments

Comments

@MathiasCimelli
Copy link

Hi vitaliy-1,

I think JATSParser doesn't recognise the encoded character "&".

I have tested the three critical characters to XML (< / > are correctly interpreted) but the ampersand (&) is not.
That's cause problems in the full text rendering.

Best regards,
CimelliM

@Vitaliy-1
Copy link
Owner

Hi @MathiasCimelli,

Do you mean &amp; encoding sequence for ampersand or something else?

@MathiasCimelli
Copy link
Author

Hi,

Yes, when i try to display in full text a sign "&" he disapear and leave an error in the following text.
Example :
I have a title

named "Methods & Material"
And the result in the full text is my title as desapeared and the close tag of the

tag is not more writed, so the following text take the form of the title.

In the xml the tag & is present but with the parser that leave a blank.

Thank you,
CimelliM

@rinorazzi
Copy link

rinorazzi commented Oct 21, 2022

Hi @Vitaliy-1

I have the same issue as @MathiasCimelli.
It occurs when the title tag of a section contains &#x0026; which is the HEX encoded HTML entity for "&" (ampersand).

Here is an example.

<sec id="sec1-2">
<title>BACKGROUND &#x0026; AIMS</title>
<p> ....</p>

In this example the parsing of the title breaks and the HTML generated by JatsParser contains an open <h2> tag
without the corresponding </h2> closure.

This happens with version 2.1.9.3 of JatsParser.

The same issue also occurs in an older versions of JatsParser (compatible with OJS 3.1,2) but the effect is different:
in that case the <h2> gets closed but the portion of the title after the & is cut. So, with the above XML example the generated HTML would be
<h2>BACKGROUND</title>

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

3 participants