You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note that the < in the Javascript is escaped to <, which seems to be invalid Javascript, as it causes the browser's JS parser to get confused and throw a syntax error. But the following, with < instead of <, does run:
Since the contents of a <script> tag are parsed differently by the browser (i.e. HTML escape codes are not interpreted), it seems like maybe the default behavior of flute:script should be to not HTML-escape the content.
In the meantime, a workaround seems to be manually setting flute:*escape-html* to nil:
I'm not an HTML/JS pro though, nor a Flute pro, so if I should be doing this a different way instead, let me know.
(And yes, I know that <script src="..."></script> can also be used, but it seems more ergonomic that both use-cases would be handled correctly by Flute. IMO anyway)
The text was updated successfully, but these errors were encountered:
With Flute and Parenscript, something like this doesn't work:
because the result looks like this:
Note that the
<
in the Javascript is escaped to<
, which seems to be invalid Javascript, as it causes the browser's JS parser to get confused and throw a syntax error. But the following, with<
instead of<
, does run:Since the contents of a
<script>
tag are parsed differently by the browser (i.e. HTML escape codes are not interpreted), it seems like maybe the default behavior offlute:script
should be to not HTML-escape the content.In the meantime, a workaround seems to be manually setting
flute:*escape-html*
tonil
:I'm not an HTML/JS pro though, nor a Flute pro, so if I should be doing this a different way instead, let me know.
(And yes, I know that
<script src="..."></script>
can also be used, but it seems more ergonomic that both use-cases would be handled correctly by Flute. IMO anyway)The text was updated successfully, but these errors were encountered: