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

Syntax highlighter uses classes, style-src locked down #499

Merged
merged 3 commits into from
Dec 13, 2020

Conversation

RobinDaugherty
Copy link
Member

  • Use CSS classes to provide code syntax highlighting style.
  • That gets rid of the last use of style attributes, so add a nonce to the style tag and lock down the style-src Content Security Policy.
  • Also fix the attempted load of a favicon. We never referred to one in Better Erors, but the browser attempts to load /favicon.ico by default. So by providing a blank one and allowing data: img-src in the CSP, we can stop the browser from complaining about it. (It might be nice to actually have a favicon representing Better Errors, but it doesn't seem very important right now.)

@RobinDaugherty RobinDaugherty force-pushed the feature/syntax-highlight-using-classes branch from 547ab5d to e115f36 Compare December 13, 2020 14:29
@coveralls
Copy link

coveralls commented Dec 13, 2020

Pull Request Test Coverage Report for Build 418956541

  • 6 of 6 (100.0%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 96.798%

Totals Coverage Status
Change from base Build 418955866: 0.0%
Covered Lines: 514
Relevant Lines: 531

💛 - Coveralls

@BetterErrors BetterErrors deleted a comment from coveralls Dec 13, 2020
@RobinDaugherty RobinDaugherty merged commit db2086f into master Dec 13, 2020
@RobinDaugherty RobinDaugherty deleted the feature/syntax-highlight-using-classes branch December 13, 2020 15:17
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.

None yet

2 participants