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

All special characters are not correctly parsed #637

Open
5 of 6 tasks
shaun-funke opened this issue Feb 6, 2024 · 4 comments
Open
5 of 6 tasks

All special characters are not correctly parsed #637

shaun-funke opened this issue Feb 6, 2024 · 4 comments

Comments

@shaun-funke
Copy link

shaun-funke commented Feb 6, 2024

  • Are you running the latest version?
  • Have you included sample input, output, error, and expected output?
  • Have you checked if you are using correct configuration?
  • Did you try online tool?

Description

Parsing of all special characters does not render correct XML. FWIW, a simple workaround is to just use a regex to find the other special characters which are not currently being parsed correctly and replace them accordingly, as seen in the Expected output. 🙏

Input

A jest test be written to test the expected output of parser.

Input: `Example & < > " ' “ ” ‘ ’ « » „ “ caption with special characters`

Code

parse()

Output

Received: "Example & < > \" ' &#8220; &#8221; &#8216; &#8217; &#171; &#187; &#8222; &#8220; caption with special characters"

expected data

Expected: "Example &amp; &lt; &gt; &quot; &apos; &#8220; &#8221; &#8216; &#8217; &#171; &#187; &#8222; &#8220; caption with special characters"

Would you like to work on this issue?

  • Yes
  • No

Bookmark this repository for further updates. Visit SoloThought to know about recent features.

Copy link

github-actions bot commented Feb 6, 2024

We're glad you find this project helpful. We'll try to address this issue ASAP. You can vist https://solothought.com to know recent features. Don't forget to star this repo.

@shaun-funke shaun-funke changed the title Parsing of special characters is not correct All special characters are not correctly parsed Feb 6, 2024
@amitguptagwl
Copy link
Member

What version of the library are you using?

@shaun-funke
Copy link
Author

What version of the library are you using?

4.2.5

@amitguptagwl
Copy link
Member

Can you please try with latest version? and let me know if you see the issue?

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