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

Emit Jelly file inside <script> tags #612

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

Conversation

daniel-beck
Copy link
Member

@daniel-beck daniel-beck commented Nov 26, 2024

Proof of concept quality: This currently makes empty-bodied <script> tags into CSP violations (see View/index.jelly).

WDYT? Worth pursuing?

Testing done

Screenshot 2024-11-27 at 00 00 22

Submitter checklist

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue

@Wadeck
Copy link
Contributor

Wadeck commented Nov 27, 2024

FTR from Daniel in Gitter:

It's a bit (very) limited given we're restricted to just 40 chars in Firefox at least, but perhaps this might end up useful?

@Wadeck
Copy link
Contributor

Wadeck commented Nov 27, 2024

nit suggestion: use //xxx instead of /*...*/ to save 2 characters as we seem to be lacking space

Daniel found the spec: https://www.w3.org/TR/CSP3/#violation-sample

A violation’s sample will be populated with the first 40 characters of an inline script, event handler, or style that caused an violation. Violations which stem from an external file will not include a sample in the violation report.

@daniel-beck
Copy link
Member Author

daniel-beck commented Nov 27, 2024

save 2 characters as we seem to be lacking space

Seems less safe to do to me.

Also FTR I will need to confirm it's fine to not have //<![CDATA[ at the start of a block like this.

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

Successfully merging this pull request may close these issues.

2 participants