Comments (5)
Even if it was a good idea, on the technical side there is no good solution for
cases like:
<jsp:include name="html" value="<br/>" />
as "/>" is not unique enough sequence to assume it won't be used anywhere
inside jsp tag. I am currently just using regular expressions for parsing, this
would require full scale jsp grammar parser to get it right.
If you need extra features you can always just download the sources and modify
them to your needs.
Original comment by [email protected]
on 27 Aug 2010 at 5:58
- Changed state: WontFix
- Added labels: Type-Enhancement
- Removed labels: Type-Defect
from htmlcompressor.
You are right, however the same is also happening here:
<script type="text/javascript">
<!--
// Don't forget to add </script> at the end!
document.write('bla bla bla');
[...]
-->
</script>
The regexp you're using would not realize the first </script> should be ignored.
Isn't this the same case?
Original comment by [email protected]
on 27 Aug 2010 at 6:17
from htmlcompressor.
You are not allowed to have </script> tag anywhere inside, it should be always
masked: <\/script>.
Maybe I can add support for custom skip rules, so you can manually add any
regexp you like. I will try to look into it on the weekend and see how it fits
into the picture, can't promise anything though.
Original comment by [email protected]
on 27 Aug 2010 at 3:20
from htmlcompressor.
Well, that would certainly be very interesting!
Original comment by [email protected]
on 27 Aug 2010 at 7:25
from htmlcompressor.
Custom rules were added in 0.9.2 (see the front page for examples). Hopefully
this solves it.
Original comment by [email protected]
on 28 Aug 2010 at 2:25
- Changed state: Fixed
from htmlcompressor.
Related Issues (20)
- a
- preserve-line-breaks causes StackOverFlow when consumed 2000 empty lines. HOT 1
- Velocity Version
- compressor replaces double spaces in urls and thus brokes the links HOT 1
- http://compilehtml.com/ not working anymore HOT 2
- javaScript wan't be compressed
- How to use the htmlcompressor? HOT 1
- [deleted issue]
- Unable to use latest closure compiler HOT 3
- how can i did not reduce spaces when it is in the input tag HOT 1
- removeSpacesInsideTags incorrectly removes space after some unquoted attributes HOT 1
- Unable to use closure HOT 2
- Extend HTML compressor to compress and combine external files
- Google Closure Compiler compiler.jar not found even though present
- one-line comment HOT 1
- styleTypeAttrPattern should also search for type="text/css"
- Add a --preserve-single-line-break option
- Update for JSP 2.2 HOT 2
- greedy simple attributes remove content for all attributes ending in "disabled" such as ng-disabled
- && in attributes breaks compression HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from htmlcompressor.