From 21166ae0dfe8e63e7bed58f74b9cc13c1bdb3a93 Mon Sep 17 00:00:00 2001 From: gilgulgamesh <101465208+gilgulgamesh@users.noreply.github.com> Date: Wed, 24 Jun 2026 17:53:51 +1300 Subject: [PATCH 1/7] Update Hyperscript.jl made kebab(camel) never touch first letter --- src/Hyperscript.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Hyperscript.jl b/src/Hyperscript.jl index 0ce9d13..aa46776 100644 --- a/src/Hyperscript.jl +++ b/src/Hyperscript.jl @@ -180,7 +180,7 @@ printescaped(io::IO, x::AbstractChar, escapes) = printescaped(io, string(x), esc printescaped(io::IO, x, escapes) = printescaped(io, sprint(print, x), escapes) # pass numbers (and 1-character attributes) through untrammelled -kebab(camel::String) = length(camel) > 1 ? join(islowercase(c) || isnumeric(c) || c == '-' ? c : '-' * lowercase(c) for c in camel) : camel +kebab(camel::String) = camel[1] * join(islowercase(c) || isnumeric(c) || c == '-' ? c : '-' * lowercase(c) for c in camel[2:end]) ## HTMLSVG From b4928e27b6da0a6f87336abc9eba24ebf64f4baf Mon Sep 17 00:00:00 2001 From: gilgulgamesh <101465208+gilgulgamesh@users.noreply.github.com> Date: Wed, 24 Jun 2026 22:44:13 +1300 Subject: [PATCH 2/7] Update Hyperscript.jl disabled escapes (empty escape dicts) --- src/Hyperscript.jl | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/Hyperscript.jl b/src/Hyperscript.jl index aa46776..e494c21 100644 --- a/src/Hyperscript.jl +++ b/src/Hyperscript.jl @@ -311,14 +311,18 @@ end # Creates an HTML or SVG escaping dictionary chardict(chars) = Dict(c => "&#$(Int(c));" for c in chars) +# Used for CSS nodes, as well as children of tag nodes defined with @tags_noescape +const NO_ESCAPES = Dict{Char, String}() + # See: https://stackoverflow.com/questions/7753448/how-do-i-escape-quotes-in-html-attribute-values -const ATTR_VALUE_ESCAPES = chardict("&<>\"\n\r\t") +const ATTR_VALUE_ESCAPES = NO_ESCAPES +#chardict("&<>\"\n\r\t") # See: https://stackoverflow.com/a/9189067/1175713 -const HTML_ESCAPES = chardict("&<>\"'`!@\$%()=+{}[]") +const HTML_ESCAPES = NO_ESCAPES +# chardict("&<>\"'`!@\$%()=+{}[]") + -# Used for CSS nodes, as well as children of tag nodes defined with @tags_noescape -const NO_ESCAPES = Dict{Char, String}() escapetag(ctx::HTMLSVG) = HTML_ESCAPES escapeattrname(ctx::HTMLSVG) = HTML_ESCAPES From dc88f947e999ac8f926d26d4a668925034e994d5 Mon Sep 17 00:00:00 2001 From: gilgulgamesh <101465208+gilgulgamesh@users.noreply.github.com> Date: Wed, 24 Jun 2026 22:56:46 +1300 Subject: [PATCH 3/7] Update README.md --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index ea29a29..b5766e8 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,16 @@ # Hyperscript +##Changes + +Besides fixing the cmelcase algorithm for initla caps, I have removed all escapes every for everything. Remember to add them back one at a time if problems show up. + + + + + + + + Hyperscript is a package for working with HTML, SVG, and CSS in Julia. When using this library you automatically get: From 8c9378348dbe7b92c4483bcd672b6db97966aebd Mon Sep 17 00:00:00 2001 From: gilgulgamesh <101465208+gilgulgamesh@users.noreply.github.com> Date: Wed, 24 Jun 2026 22:57:09 +1300 Subject: [PATCH 4/7] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b5766e8..d4bec14 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ##Changes -Besides fixing the cmelcase algorithm for initla caps, I have removed all escapes every for everything. Remember to add them back one at a time if problems show up. +Besides fixing the camelcase algorithm for initial caps, I have removed all escapes everywhere for everything. Remember to add them back one at a time if problems show up. From e4df8a91e2b7b0ee318af1bfb63495003fa63ab7 Mon Sep 17 00:00:00 2001 From: gilgulgamesh <101465208+gilgulgamesh@users.noreply.github.com> Date: Wed, 24 Jun 2026 22:57:26 +1300 Subject: [PATCH 5/7] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d4bec14..c889375 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ##Changes -Besides fixing the camelcase algorithm for initial caps, I have removed all escapes everywhere for everything. Remember to add them back one at a time if problems show up. +Besides fixing the camelcase algorithm for initial caps, which i PR'd, I have removed all escapes everywhere for everything. Remember to add them back one at a time if problems show up. From 4fb5f9a4b091347c18fb83e81b4bf97f218bf041 Mon Sep 17 00:00:00 2001 From: gilgulgalgal Date: Wed, 24 Jun 2026 23:22:33 +1300 Subject: [PATCH 6/7] oops i just used escapes wrong, they're great! --- src/Hyperscript.jl | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/Hyperscript.jl b/src/Hyperscript.jl index e494c21..51c3048 100644 --- a/src/Hyperscript.jl +++ b/src/Hyperscript.jl @@ -238,7 +238,7 @@ renderdomchild(io, rctx::RenderContext, ctx, x::Nothing) = nothing # Render and escape other HTMLSVG children, including CSS nodes, in the parent context. # If a child is `showable` with text/html, render with that using `repr`. -renderdomchild(io, rctx::RenderContext, ctx, x) = +renderdomchild(io, rctx::RenderContext, ctx, x) = showable(MIME("text/html"), x) ? show(io, MIME("text/html"), x) : printescaped(io, x, escapechild(ctx)) # All camelCase attribute names from HTML 4, HTML 5, SVG 1.1, SVG Tiny 1.2, and SVG 2 @@ -315,12 +315,13 @@ chardict(chars) = Dict(c => "&#$(Int(c));" for c in chars) const NO_ESCAPES = Dict{Char, String}() # See: https://stackoverflow.com/questions/7753448/how-do-i-escape-quotes-in-html-attribute-values -const ATTR_VALUE_ESCAPES = NO_ESCAPES -#chardict("&<>\"\n\r\t") +const ATTR_VALUE_ESCAPES = chardict("&<>\"\n\r\t") +# # See: https://stackoverflow.com/a/9189067/1175713 -const HTML_ESCAPES = NO_ESCAPES -# chardict("&<>\"'`!@\$%()=+{}[]") +const HTML_ESCAPES = chardict("&<>\"'`!@\$%()=+{}[]") +# NO_ESCAPES + From 07968357fc086d815fbaf8175354f7aa172f0209 Mon Sep 17 00:00:00 2001 From: gilgulgalgal Date: Wed, 24 Jun 2026 23:42:15 +1300 Subject: [PATCH 7/7] Revert "oops i just used escapes wrong, they're great!" This reverts commit 4fb5f9a4b091347c18fb83e81b4bf97f218bf041. --- src/Hyperscript.jl | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/Hyperscript.jl b/src/Hyperscript.jl index 51c3048..e494c21 100644 --- a/src/Hyperscript.jl +++ b/src/Hyperscript.jl @@ -238,7 +238,7 @@ renderdomchild(io, rctx::RenderContext, ctx, x::Nothing) = nothing # Render and escape other HTMLSVG children, including CSS nodes, in the parent context. # If a child is `showable` with text/html, render with that using `repr`. -renderdomchild(io, rctx::RenderContext, ctx, x) = +renderdomchild(io, rctx::RenderContext, ctx, x) = showable(MIME("text/html"), x) ? show(io, MIME("text/html"), x) : printescaped(io, x, escapechild(ctx)) # All camelCase attribute names from HTML 4, HTML 5, SVG 1.1, SVG Tiny 1.2, and SVG 2 @@ -315,13 +315,12 @@ chardict(chars) = Dict(c => "&#$(Int(c));" for c in chars) const NO_ESCAPES = Dict{Char, String}() # See: https://stackoverflow.com/questions/7753448/how-do-i-escape-quotes-in-html-attribute-values -const ATTR_VALUE_ESCAPES = chardict("&<>\"\n\r\t") -# +const ATTR_VALUE_ESCAPES = NO_ESCAPES +#chardict("&<>\"\n\r\t") # See: https://stackoverflow.com/a/9189067/1175713 -const HTML_ESCAPES = chardict("&<>\"'`!@\$%()=+{}[]") -# NO_ESCAPES - +const HTML_ESCAPES = NO_ESCAPES +# chardict("&<>\"'`!@\$%()=+{}[]")