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

Don't set a value on the file block download attribute #10976

Merged
merged 2 commits into from Oct 24, 2018

Conversation

Projects
None yet
5 participants
@pento
Member

pento commented Oct 24, 2018

Description

This is a followup to #10948.

KSES now allows the download attribute, but only if it is set as a valueless attribute. Ie, it only allows <a download>, not <a download="">.

This PR updates the parser to add download as a valueless attribute, and uses that form for the file block download button.

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.

@pento pento added this to the 4.2 milestone Oct 24, 2018

@pento pento requested a review from WordPress/gutenberg-core Oct 24, 2018

@talldan

👍 nice and simple

@@ -57,6 +57,7 @@ const BOOLEAN_ATTRIBUTES = [
'default',
'defer',
'disabled',
'download',

This comment has been minimized.

@Copons

Copons Oct 24, 2018

Contributor

Oh, so this was the missing piece! 🤦‍♂️

@Copons

Copons approved these changes Oct 24, 2018

Thanks for the fix, @pento!
I should have asked first instead of trusting the inline comment there. 🙂

@Copons Copons referenced this pull request Oct 24, 2018

Merged

File Block: Set the download attribute as empty #10948

4 of 4 tasks complete

@tofumatt tofumatt merged commit e160836 into master Oct 24, 2018

2 checks passed

codecov/project 48.78% remains the same compared to fe737c1
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@tofumatt tofumatt deleted the fix/file-download-attribute branch Oct 24, 2018

antpb added a commit to antpb/gutenberg that referenced this pull request Oct 26, 2018

Don't set a value on the file block download attribute (WordPress#10976)
* Set the download attribute without a value

* Integration test typoes

@mtias mtias added the [Block] File label Oct 30, 2018

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