Skip to content
This repository was archived by the owner on Jan 6, 2023. It is now read-only.

Conversation

@pdehaan
Copy link
Contributor

@pdehaan pdehaan commented Dec 4, 2017

No description provided.

const defaultThemeLabel = document.getElementById('default_label');
const darkThemeLabel = document.getElementById('dark_label');

/* eslint-disable no-unsanitized/property */
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just disabled the rule for these 3 lines. Not sure if there is some "sanitization" module we wanted to use or something to make sure there aren't any potential XSS leaks from the l10n files.

@vladikoff vladikoff added the enhancement Things that are nice to have but not critical label Dec 5, 2017
@vladikoff
Copy link
Contributor

@pdehaan we shall take a look at it once we tag the sync build, thanks for the pr!

@vladikoff
Copy link
Contributor

@pdehaan Could you please rebase this?

@vladikoff vladikoff added Multiple Notes and removed enhancement Things that are nice to have but not critical labels Jan 5, 2018
@vladikoff
Copy link
Contributor

@pdehaan could you please rebase this ?

@pdehaan
Copy link
Contributor Author

pdehaan commented Feb 5, 2018

@vladikoff Consider yourself rebased... I also bumped the eslint-plugin-mozilla and eslint dependency versions and ran eslint src --fix to auto-fix all the formatting errors.

I also noticed that indenting may be a bit funky in some places since we don't seem to have any indent rules enabled in ESLint. I could run it through prettier (npm run format), but not sure how noisy and disruptive that would be, so I'd save it for a future PR.

"format": "prettier 'src/**/!(vendor)/*.{css,js}' --single-quote --write",

@Natim
Copy link
Collaborator

Natim commented Feb 5, 2018

Thanks @pdehaan we will definitely add prettier while moving to a React.JS codebase.

@vladikoff vladikoff merged commit 82c9355 into mozilla:master Feb 5, 2018
@vladikoff
Copy link
Contributor

@pdehaan thank you!

@mozfreddyb
Copy link

@vladikoff wrote
we shall take a look at [sanitizing html] once we tag the sync build, thanks for the pr!

so, @vladikoff did you? :)
If not, I recommend looking at https://github.com/cure53/DOMPurify

@vladikoff
Copy link
Contributor

@pdehaan any luck adding that ^ ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants