Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Infinite: parseHTML strips out script tags by default #624

Open
aleemb opened this issue Oct 13, 2022 · 0 comments
Open

Infinite: parseHTML strips out script tags by default #624

aleemb opened this issue Oct 13, 2022 · 0 comments

Comments

@aleemb
Copy link

aleemb commented Oct 13, 2022

In Infinite.js parseHTML strips out <script> tags by default:

var $data = $($.parseHTML(data))

In my use-case I'd prefer:

var $data = $($.parseHTML(data, undefined, true))

This makes it very handy to include any JS code (analytics, ads, etc) directly in the output. I'm not sure why this is not the default behavior for Infinite JS since the HTML is trusted and it's probably desirable. Maybe you could include an optional flag to allow <script> tags it if there are reasons to exclude it in the first place?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant