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
440 stars 48 forks source link

<button> type attribute with "submit" value is removed #162

Closed dang-le closed 12 months ago

dang-le commented 12 months ago

From changelog v2.7.0 - September 24, 2019, the

Taritsyn commented 12 months ago

Hello, Dang!

The default type for Microsoft Edge is "button", while in other browsers (and in the W3C specification) it is "submit".

Just now I checked this behavior for Internet Explorer 11 and Microsoft Edge 114.0.1823.67, the default value is submit.

You can prevent the removing of this attribute by using the following settings:

new HtmlMinificationSettings()
{
    …
    PreservableAttributeList= "button[type]",
    …
}