Skip to content

Conversation

@SergioEstevao
Copy link
Contributor

This PR is an attempt to allow removal of attributes on Media attachments.

For example if we have this html:

<img src="http://wordpress.com/logo.png" data-wp="ID">

And then I want to remove the data-wp using the extraAttributes property on MediaAttachment I was unable to do it because it was being stored on the HTMLRepresentation of that element and saved back to the HTML.

The test method added on the PR show this clearer.

The change I'm proposing is to not save the original HTMLRepresentation for Media Attachments because they already have a mechanism to save all the attributes in them.

I'm open to other suggestion to solve this issue.

@SergioEstevao SergioEstevao added this to the Beta 14 (next stable) milestone Oct 24, 2017
@jleandroperez jleandroperez self-requested a review October 30, 2017 13:54
Copy link
Contributor

@diegoreymendez diegoreymendez left a comment

Choose a reason for hiding this comment

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

Sweet!

Copy link
Contributor

@jleandroperez jleandroperez left a comment

Choose a reason for hiding this comment

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

:shipit:

@SergioEstevao SergioEstevao merged commit c1a743b into develop Oct 30, 2017
@SergioEstevao SergioEstevao deleted the issue/attributes_on_attachments branch October 30, 2017 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants