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

Fix: Trac#52990 - Account for single quoted attrs #1358

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

pyronaur
Copy link

@pyronaur pyronaur commented Jun 9, 2021

Trac ticket: https://core.trac.wordpress.org/ticket/52990

This PR accounts for attributes using single quotes in images and iframes to address the issue described in Trac:52990

@github-actions
Copy link

github-actions bot commented Jun 9, 2021

Hi @pyronaur! 👋

Thank you for your contribution to WordPress! 💖

It looks like this is your first pull request to wordpress-develop. Here are a few things to be aware of that may help you out!

No one monitors this repository for new pull requests. Pull requests must be attached to a Trac ticket to be considered for inclusion in WordPress Core. To attach a pull request to a Trac ticket, please include the ticket's full URL in your pull request description.

Pull requests are never merged on GitHub. The WordPress codebase continues to be managed through the SVN repository that this GitHub repository mirrors. Please feel free to open pull requests to work on any contribution you are making.

More information about how GitHub pull requests can be used to contribute to WordPress can be found in this blog post.

Please include automated tests. Including tests in your pull request is one way to help your patch be considered faster. To learn about WordPress' test suites, visit the Automated Testing page in the handbook.

If you have not had a chance, please review the Contribute with Code page in the WordPress Core Handbook.

The Developer Hub also documents the various coding standards that are followed:

Thank you,
The WordPress Project

@pyronaur
Copy link
Author

pyronaur commented Jun 9, 2021

Looked at the broken unit tests - it seems that they might be broken at a repository level and nothing to do with the patch?

@ocean90
Copy link
Member

ocean90 commented Jun 9, 2021

Hi @pyronaur, there are actually two failing tests. Here's the direct link: https://github.com/WordPress/wordpress-develop/pull/1358/checks?check_run_id=2782515804#step:20:274

@pyronaur
Copy link
Author

pyronaur commented Jun 9, 2021

Thanks @ocean90

Curious - there are tests that assert that single quotes should fail 🤔 .

1) Tests_Media::test_wp_img_tag_add_loading_attr_with_single_quotes
Failed asserting that '<img loading="lazy" src='example.png' alt=' width='300' height='225' />' does not contain " loading=".

/var/www/tests/phpunit/tests/media.php:2886

2) Tests_Media::test_wp_iframe_tag_add_loading_attr_with_single_quotes
Failed asserting that '<iframe loading="lazy" src='https://www.example.com' width='640' height='360'></iframe>' does not contain " loading=".

/var/www/tests/phpunit/tests/media.php:2931

@WordPress WordPress deleted a comment from ella225 Apr 8, 2024
Copy link

github-actions bot commented Apr 8, 2024

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Unlinked Accounts

The following contributors have not linked their GitHub and WordPress.org accounts: @pyronaur, @ella225.

Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases.

Core Committers: Use this line as a base for the props when committing in SVN:

Props ocean90.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@ella225

This comment was marked as spam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants