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

Store validation errors in order of occurrence in document #1335

merged 1 commit into from Aug 12, 2018


Copy link

@westonruter westonruter commented Aug 12, 2018

I'm noticing that validation errors listed on the Invalid Page screen are in reverse order from how they appear in the document. A validation error with meta viewport is at the bottom of the list, and the validation error for a custom script in the page is appearing near the top of the validation error list. Nevertheless, a CSS validation error is appearing before, so I think it is an issue with how the whitelist sanitizer is iterating over the DOM backwards. In particular, array_pop() is being used instead of array_shift() in:

Switching these around fixes the problem.

@westonruter westonruter added this to the v1.0 milestone Aug 12, 2018
Copy link

@amedina amedina left a comment

Small change; good impact on DX. Ship it.

@westonruter westonruter merged commit bf6804d into develop Aug 12, 2018
2 checks passed
@westonruter westonruter deleted the fix/validation-error-order branch Aug 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants