Skip to content

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

Merged
tofumatt merged 2 commits into
masterfrom
fix/file-download-attribute
Oct 24, 2018
Merged

Don't set a value on the file block download attribute#10976
tofumatt merged 2 commits into
masterfrom
fix/file-download-attribute

Conversation

@pento

@pento pento commented Oct 24, 2018

Copy link
Copy Markdown
Member

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 [Feature] Parsing Related to efforts to improving the parsing of a string of data and converting it into a different f [Package] Block library /packages/block-library labels Oct 24, 2018
@pento pento added this to the 4.2 milestone Oct 24, 2018
@pento pento requested a review from a team October 24, 2018 01:46

@talldan talldan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍 nice and simple

'default',
'defer',
'disabled',
'download',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

@Copons Copons left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

@tofumatt tofumatt merged commit e160836 into master Oct 24, 2018
@tofumatt tofumatt deleted the fix/file-download-attribute branch October 24, 2018 12:04
antpb pushed a commit to antpb/gutenberg that referenced this pull request Oct 26, 2018
* Set the download attribute without a value

* Integration test typoes
@mtias mtias added the [Block] File Affects the File Block label Oct 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Block] File Affects the File Block [Feature] Parsing Related to efforts to improving the parsing of a string of data and converting it into a different f [Package] Block library /packages/block-library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants