Taritsyn / WebMarkupMin

The Web Markup Minifier (abbreviated WebMarkupMin) - a .NET library that contains a set of markup minifiers. The objective of this project is to improve the performance of web applications by reducing the size of HTML, XHTML and XML code.
Apache License 2.0
449 stars 48 forks source link

removing </link> tags on xml #124

Closed komplika closed 3 years ago

komplika commented 3 years ago

Hi

i'm using for .net core 5 website and generate xml files. it's removing close tag in xml

`

xxx.com Products https://xxx.com xxx.com facebook pixel products`
Taritsyn commented 3 years ago

Hello!

What minifier are you using? From description of the error, it looks like you are using an HTML minifier to minify a XML code.

komplika commented 3 years ago

Hi,

WebMarkupMin.Core and WebMarkupMin.AspNetCore5.

Generating a facebook xml from website.

Html minification Works perfectly. But xml it don’t.

From: Andrey Taritsyn [mailto:notifications@github.com] Sent: Wednesday, February 17, 2021 11:46 AM To: Taritsyn/WebMarkupMin WebMarkupMin@noreply.github.com Cc: komplika info@ucilke.com; Author author@noreply.github.com Subject: Re: [Taritsyn/WebMarkupMin] removing tags on xml (#124)

Hello!

What minifier are you using? From description of the error, it looks like you are using an HTML minifier to minify a XML code.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Taritsyn/WebMarkupMin/issues/124#issuecomment-780400087 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AMQPQNIK2SFFXMBTKHT72GDS7N64NANCNFSM4XX5RVZQ . https://github.com/notifications/beacon/AMQPQNIIE6EK6PAVEYVYNSLS7N64NA5CNFSM4XX5RVZ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOF2B7LVY.gif

Taritsyn commented 3 years ago

Generating a facebook xml from website.

Under what a Content-Type HTTP header is this document returned?

komplika commented 3 years ago

Hi,

Content-type xml

From: Andrey Taritsyn [mailto:notifications@github.com] Sent: Wednesday, February 17, 2021 12:13 PM To: Taritsyn/WebMarkupMin WebMarkupMin@noreply.github.com Cc: komplika info@ucilke.com; Author author@noreply.github.com Subject: Re: [Taritsyn/WebMarkupMin] removing tags on xml (#124)

Generating a facebook xml from website.

Under what a Content-Type HTTP header is this document returned?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Taritsyn/WebMarkupMin/issues/124#issuecomment-780414842 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AMQPQNKQ4B4X6FKACG75QVTS7OCBDANCNFSM4XX5RVZQ . https://github.com/notifications/beacon/AMQPQNNEDN5NHAHBT7G7KDLS7OCBDA5CNFSM4XX5RVZ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOF2CC66Q.gif

Taritsyn commented 3 years ago

Content-type xml

This is an invalid content type.

Show me your WebMarkupMin settings from the Startup.cs file.

komplika commented 3 years ago

it's resolved for adding to content-type th document HttpContext.Response.ContentType = "application/xml";