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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update regex for tag selectors #1534

Merged
merged 5 commits into from Nov 20, 2018

Conversation

Projects
None yet
2 participants
@swissspidy
Collaborator

swissspidy commented Oct 25, 2018

This prevents cases where legit CSS selectors were wrongly renamed.

Props @westonruter for the fix 馃檪

Fixes #1513.

@swissspidy swissspidy requested a review from westonruter Oct 25, 2018

@swissspidy

This comment has been minimized.

Collaborator

swissspidy commented Oct 25, 2018

Failing test:

1) AMP_Style_Sanitizer_Test::test_amp_selector_conversion with data set "iframe" ('<p><b>purple</b><iframe src="...e></p>', 'p>*:not(iframe){color:purple}', 'p>*:not(amp-iframe){color:purple}')
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'p>*:not(amp-iframe){color:purple}'
+'p>*:not(iframe){color:purple}'
@westonruter

This comment has been minimized.

Member

westonruter commented Oct 25, 2018

We'll need to add some tests.

@westonruter

And some tests needed.

Show resolved Hide resolved includes/sanitizers/class-amp-style-sanitizer.php Outdated

@westonruter westonruter changed the base branch from develop to 1.0 Nov 20, 2018

swissspidy and others added some commits Oct 25, 2018

@westonruter westonruter force-pushed the fix/style-sanitizer-regex branch from 231710f to bb188ea Nov 20, 2018

@westonruter westonruter added this to the v1.0 milestone Nov 20, 2018

@westonruter westonruter force-pushed the fix/style-sanitizer-regex branch from 6e7353c to d135818 Nov 20, 2018

@westonruter westonruter force-pushed the fix/style-sanitizer-regex branch from d135818 to 2379ac5 Nov 20, 2018

@westonruter westonruter merged commit 9f3de03 into 1.0 Nov 20, 2018

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

kienstra added a commit that referenced this pull request Nov 20, 2018

Add PR #1534 to the changelog
This is recently merged,
thanks to swissspidy's work.

@swissspidy swissspidy deleted the fix/style-sanitizer-regex branch Nov 21, 2018

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