htmlmin icon indicating copy to clipboard operation
htmlmin copied to clipboard

Process character references in data

Open mina86 opened this issue 4 years ago • 1 comments

Re-escape characters in data to minimise code further. In data sections only ampersand and less-than sign need to be escaped. Since characters are always shorter than their entities not escaping what doesn’t need to saves space. Furthermore, don’t escape ampersand in situations in which HTML5 dictates it doesn’t need to be escape.

mina86 avatar Mar 03 '21 09:03 mina86

Thanks for the PR. I am going to spend some time digesting this and hope to get it in soon if it makes sense.

mankyd avatar Mar 05 '21 02:03 mankyd