Swaagie / minimize

Minimize HTML
MIT License
162 stars 18 forks source link

HTML Attribute Contenteditable Removed By Minimize #109

Open gizapp opened 1 year ago

gizapp commented 1 year ago

Minimize removes the contenteditable attribute, which leads to major changes to the parsed HTML code

Example code:

const Minimize = require('minimize')
new Minimize().parse('<html><body><span contenteditable>hello world</span></body></html>')

Produces <html><body><span>hello world</span></body></html> where the attribute was removed. This means the user is no longer allowed to edit the "hello world" text in the span.

This can be worked around by using contenteditable="true" instead, but this defeats the purpose of minimizing the HTML