Comments (1)
In the current master version (1.0.5) of
hiccup.util
, a dynamic variable*escape-strings?*
is declared. However, it doesn't appear to be present in the 1.0.5 jar file as downloaded from clojars.org.
The *escape-strings?*
variable was introduced in 2.0.0-alpha1. The master branch is tracking 2.0.0, not 1.0.5.
There is a function
hiccup.compiler/escape-html
which reads this variable, and, if it is bound to true (as by default it is), calls a functionhiccup.util/escape-html
on its argument.I'm currently having a problem with hiccup rendering single quote characters within JavaScript strings as
&apos
Why is that a problem?
So, my questions:
1. is it an oversight that `hiccup.util/*escape-strings?*` is missing from the 1.0.5 jar on clojars.org?
No, because that variable was added laater.
2. if so, would a patch to allow a new 1.0.6 version with the variable present to be compiled be accepted?
No, because that variable ties into the 2.0.0 changes around raw strings.
3. if not, is it the intention that the `:escape-strings?` option key in 2.0.0, given the value `false`, should disable `'` substitution?
I believe that attributes are always escaped, as I don't know of any reason not to.
4. if so, would a patch to allow a new 2.0.0-alpha3 version with the options key `:escape-strings?` working to be compiled be accepted?
Working for attributes you mean? You'd need to provide a reason for allowing unescaped attribute values.
from hiccup.
Related Issues (20)
- Shouldn't this line call the html function in hiccup2.core? HOT 1
- Hi How to write hiccup code for observable embed code in Roam ? HOT 3
- Null pointer exception with `:class` attribute containing vector nil HOT 3
- Replace license.html with license.txt (for artifact scanners) HOT 9
- Passing nil query param values to to url-encode throws exception
- New version? HOT 15
- :script async HOT 1
- Clojerl support HOT 2
- Historical question: Why is hiccup called hiccup? HOT 2
- link to api docs in project description is broken HOT 3
- Please remove.
- Fragment equivalent for the back end. HOT 2
- hiccup.core/h not backward-compatible HOT 1
- Getting RuntimeException: no such var util/raw-string HOT 2
- Parameters for iframe src attribute HOT 8
- clj-kondo exported config HOT 4
- void-tags might not be complete HOT 3
- "Method code too large!" when compiling the hiccup2.core/html macro HOT 1
- Exponential increase in generated code when there are multiple nested hiccup2.core/html calls HOT 2
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 hiccup.