spshukla / htmlcompressor

Automatically exported from code.google.com/p/htmlcompressor
https://code.google.com/p/htmlcompressor/
Apache License 2.0
0 stars 0 forks source link

compressor replaces double spaces in urls and thus brokes the links #83

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. create a simple html file with two spaces in the 'href' attribute:
<html> <a href="/two  spaces"> link </a> </html>

2. run java -jar htmlcompressor.jar example.html

What is the expected output? What do you see instead?
expected output:
compressed html code with non-broken 'href' attribute, something like:
<html> <a href="/two  spaces"> link </a> </html>

actual output:
<html> <a href="/two spaces"> link </a> </html>

What version of the product are you using? On what operating system?
Ubuntu 10.04 64-bit, unknown version of htmlcompressor, i just can't find a way 
to get the version from the jar. Maybe it is another issue?)

Please provide any additional information below.
htmlcompressor brokes 'href' attributes of links, so it is a bug in it.

Original issue reported on code.google.com by vasi...@hotger.com on 10 Mar 2013 at 6:48

GoogleCodeExporter commented 8 years ago
Sorry, I don't think this is something htmlcompressor should deal with. URLs 
are supposed to be encoded:

<a href="/two%20%20spaces">

Or you can tell htmlcompressor to skip that piece:

<!-- {{{ --><a href="/two  spaces"><!-- }}} --> 

Original comment by serg472@gmail.com on 10 Mar 2013 at 7:02