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

fix: escape xml attribute value when it has special html characters #100

Merged
merged 1 commit into from
Jul 21, 2022

Conversation

akki-io
Copy link
Contributor

@akki-io akki-io commented May 24, 2022

There are sometimes XML element that has values with quotes etc.

Example -

<meta-data name="icons" value="[{&quot;src&quot;:&quot;icon_512.png&quot;,&quot;sizes&quot;:&quot;512x512&quot;,&quot;type&quot;:&quot;image/png&quot;,&quot;purpose&quot;:&quot;any maskable&quot;}]">

The decompress() method inside the XmlParser class outputs this XML element with quotes which makes the XML invalid.

decompress() output

<meta-data name="icons" value="[{"src":"icons_512.png","sizes":"512x512","type":"image/png","purpose":"any maskable"}]">

This PR adds the feature to convert these special characters so that the XML is valid.

decompress() new output

<meta-data name="icons" value="[{&quot;src&quot;:&quot;icons_512.png&quot;,&quot;sizes&quot;:&quot;512x512&quot;,&quot;type&quot;:&quot;image/png&quot;,&quot;purpose&quot;:&quot;any maskable&quot;}]">

@tufanbarisyildirim tufanbarisyildirim merged commit e7e218a into tufanbarisyildirim:master Jul 21, 2022
@tufanbarisyildirim
Copy link
Owner

Thanks @akki-io

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

Successfully merging this pull request may close these issues.

None yet

2 participants