ctdean / htmhell

A really garbage HTML library.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

htmhell

A really garbage HTML library.

Contains all sorts of functionality:

  • HTML escaping that probably isn't insecure
  • America's #1 worst templating system

Clojars Project

Usage

  1. Add this as a dependency in your project.clj:
[htmhell "0.1.0"]
  1. Write your garbage code:
(require '[htmhell.core :as html])

(def my-html-escaped-string (html/escape "<script>alert('Jerry, hello!');</script>"))
  1. Write your garbage template:
<!-- resources/index.html -->
<html>
  <div>Kramer's first name is {{name}}.</div>
</html>
  1. Render your garbage data:
(def my-html (html/render-template "index.html" {:name "Cosmo"}))

FAQs

  1. Does it do <blank>?

No.

  1. How does it do <blank>?

Regex, mostly.

  1. Is there any redeeming value here?

You be the judge!

License

Copyright © 2015 Jim Brusstar

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.

About

A really garbage HTML library.

License:Eclipse Public License 1.0


Languages

Language:Clojure 100.0%