hiccup Questions
4
Solved
I'm looking for a function that reverses clojure hiccup
so
<html></html>
turns into
[:html]
etc.
Following up from the answer by @kotarak, This now works for me:
(use 'net....
2
Solved
I don't understand the tag ":<>" in the following code
clojure re-frame todomvc
(defn todo-app
[]
[:<>
[:section#todoapp
[task-entry]
(when (seq @(subscribe [:todos]))
[...
2
I just tried this with Hiccup:
(hiccup.core/html [:h1 "<script>alert('xss');</script>"])
and to my surprise I got an alert box, Hiccup is not escaping strings by default. I see that ...
3
Solved
I need to build style info within hiccup in order to place an element at a location indicated by the variables "top" and "left". My code looks like so:
(html [:div {:style (str "top" top ";left"...
2
I'm writing a webserver app in clojure with Hiccup (and other things).
I'm trying to have a check-box enable and disable two drop-down fields with a little JS but I can't make it work.
[:head
[:sc...
Jockey asked 5/7, 2017 at 17:23
1
Solved
I am using ClojureScript Reagent. Which provides hiccup-like HTML generation.
I have a String with HTML:
(def code "<b>hello world</b>")
When passed to Hiccup it will be escaped and...
5
Solved
All of the popular Clojure web frameworks I am seeing use hiccup to generate HTML. I find hiccup is hard to have a front end design person adjust to, compared to other frameworks that parse t...
Nicotiana asked 25/6, 2011 at 0:9
1
Solved
How can I parse a string of Hiccup into a Hiccup node?
For example,
"[:b 'hello world']" into [:b "hello world"]
Karonkaross asked 21/3, 2015 at 3:51
1
Solved
I've been converting some Noir websites to Compojure.
I have a function here that creates the layout of the page:
(defn layout [title & content]
(html5
[:head
[:title "My Site | " title]...
2
Solved
To upload a file to a server I'm writing in Clojure I need a client form that looks something like this:
<form action="/file" method="post" enctype="multipart/form-data">
<input name="fil...
Hetrick asked 17/1, 2011 at 11:30
2
Solved
I'm relatively new to Clojure and Compojure web development. The first issue that I've noticed in the toy example that I'm building is that of HTML templating. I'd like to have support for somethin...
1
Is there anything equivalent to will_paginate for noir/hiccup?
How do people usually paginate with noir/hiccup?
Thank you
Hyaluronidase asked 25/11, 2012 at 13:50
2
Solved
I have a function that begins like this:
(defn data-one [suser]
(def suser-first-name
(select db/firstNames
(fields :firstname)
(where {:username suser})))
(def suser-middle-name
(select db...
Pilfer asked 29/9, 2012 at 17:38
1
Solved
is there any way to return a clojure function as a string? I am making some online documentation and I would really like to be able to add code into the html by somehow evaluating a function into t...
1
Solved
I'm creating a compojure project using hiccup-1.0.0-beta1. I get the following stack trace when I run lein ring server-headless:
Caused by: java.lang.IllegalAccessError: defelem does not exist
at ...
1
Solved
When I run the web application in the ring jetty server, I got EOF exception, I can't fix this, since there is no clue on which line the error has occurred. I'm using compojure and hiccup on my clo...
2
Solved
I'd like my program to output the following HTML:
<!--[if lt IE 8]><link rel="stylesheet" href="../blueprint/ie.css" type="text/css" media="screen, projection"><![endif]-->
Is ...
1
© 2022 - 2024 — McMap. All rights reserved.