owenthereal / jqplay

A playground for jq, written in Go
https://jqplay.org
MIT License
740 stars 88 forks source link

Official jqplay instance mangles raw output #149

Closed Mikle-Bond closed 10 months ago

Mikle-Bond commented 11 months ago

I tried to come up with something that can convert JSON into HTML. It works (as far as I'm concerned), but when I turn on the "Raw Output" it mangles the output and injects a Cloudflare script into the body.

Example: https://jqplay.org/s/tyODQglm30J

Output I expect:

<!DOCTYPE html>
<html lang="en">
    <head>
        head
    </head>
    <body>
        body
    </body>
</html>

Output I get (some tokens I replaced with [ snip ], just in case)

<!DOCTYPE html>
<html lang="en">
<head>
head
</head>
<body>
body
<script defer src="https://static.cloudflareinsights.com/beacon.min.js/[ snip ]" integrity="sha512-euoFGowhlaLqXsPWQ48qSkBSCFs3DPRyiwVu3FjR96cMPx+Fr+gpWRhIafcHwqwCqWS42RZhIudOvEI+Ckf6MA==" data-cf-beacon='{"rayId":"[ snip ]","r":1,"version":"2023.10.0","token":"[ snip ]"}' crossorigin="anonymous"></script>
</body>
</html>

Is this something to be concerned? I can't reproduce this on self-hosted version.

owenthereal commented 10 months ago

This is fixed in https://github.com/owenthereal/jqplay/issues/149.