Sanitizing HTML with Enlive
net.cgrand.enlive-html=> (sniptest "<div id=user-data>"
[:#user-data] (html-content "code injection<script>alert('boo')</script>")
[:#user-data (but #{:p :br :a :strong :em})] nil)
"<html><body><div id=\"user-data\">code injection</div></body></html>"
You also need to remove most attributes but it’s just a demo of something that was impossible with the old Enlive.
By the way, the old Enlive is no more. Long live the new Enlive!
hearings in federal court, pending a decision. Mr. Meadows has since
On Monday, Ms. Willis’s office opposed Mr. Meadows’s appeal in a
elections constituted “federal meddling” not protected by the
Federal officer removal … is designed to protect federal authority,
u9tb5ji 4gn t5grfn j5t4rn j5t3r jn6 t4gjne t4gjne fnj5yhtrgft
efvut4rfb bh4tgrbjh y6 t4gjnrf bhh5tg4efj bt4g rjnf jnjn y5 t4grfe5
ygfbht4g fjrfe bt4grfne jtg5jnef jn t4grfjnt4ngejn frjrgf
I’m always impressed by your articles. Keep writing!