tipsy / j2html

Java to HTML generator. Enjoy typesafe HTML generation.

Home Page:https://j2html.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Remove runtime dependencies

charphi opened this issue · comments

This library is very light but is linked to 2 big dependencies at runtime.
It would be nice to have a standalone library instead.

To do so:

  • Html escape could be coded directly.
  • compressJs could be made optional.
commented

Yes, I agree.

I was looking into a simple js-minifier I could copy-paste, but I didn't find any. Inline HTML/CSS are probably not used by a lot of people, so maybe I should just remove them.

HTML escape used to be coded directly (trivial implementation from SO), but there were some issues. Do you know of a decent and light-weight solution?

PR #36 makes use of js-minifier optional.
For html escape, I don't have a light-weight solution currently.

commented

Okay. I've merged your PR. We could make stringutils optional too, with a fallback to a trivial implementation for those who need that.

commented

Closure is now completely removed, looking for a html-escaper.

commented

I just wrote a simple one. According to owasp you don't need to do much.