Skip to content

Commit 548cc42

Browse files
committed
Merge branch 'trunk' into block-bindings/html-api-private-set-inner-html
2 parents a5c4454 + 44e6c75 commit 548cc42

File tree

11 files changed

+153
-9
lines changed

11 files changed

+153
-9
lines changed

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,17 +179,17 @@
179179
"grunt": "grunt",
180180
"lint:jsdoc": "wp-scripts lint-js",
181181
"lint:jsdoc:fix": "wp-scripts lint-js --fix",
182-
"env:start": "node ./tools/local-env/scripts/start.js && node ./tools/local-env/scripts/docker.js run -T php composer update -W",
182+
"env:start": "node ./tools/local-env/scripts/start.js && node ./tools/local-env/scripts/docker.js run -T --rm php composer update -W",
183183
"env:stop": "node ./tools/local-env/scripts/docker.js down",
184184
"env:restart": "npm run env:stop && npm run env:start",
185185
"env:clean": "node ./tools/local-env/scripts/docker.js down -v --remove-orphans",
186186
"env:reset": "node ./tools/local-env/scripts/docker.js down --rmi all -v --remove-orphans",
187187
"env:install": "node ./tools/local-env/scripts/install.js",
188-
"env:cli": "node ./tools/local-env/scripts/docker.js run cli",
188+
"env:cli": "node ./tools/local-env/scripts/docker.js run --rm cli",
189189
"env:logs": "node ./tools/local-env/scripts/docker.js logs",
190190
"env:pull": "node ./tools/local-env/scripts/docker.js pull",
191191
"test:performance": "wp-scripts test-playwright --config tests/performance/playwright.config.js",
192-
"test:php": "node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit",
192+
"test:php": "node ./tools/local-env/scripts/docker.js run --rm php ./vendor/bin/phpunit",
193193
"test:coverage": "npm run test:php -- --coverage-html ./coverage/html/ --coverage-php ./coverage/php/report.php --coverage-text=./coverage/text/report.txt",
194194
"test:e2e": "wp-scripts test-playwright --config tests/e2e/playwright.config.js",
195195
"test:visual": "wp-scripts test-playwright --config tests/visual-regression/playwright.config.js",

src/wp-admin/edit-form-comment.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
<tr>
6969
<td class="first"><label for="newcomment_author_url"><?php _e( 'URL' ); ?></label></td>
7070
<td>
71-
<input type="text" id="newcomment_author_url" name="newcomment_author_url" size="30" class="code" value="<?php echo esc_attr( $comment->comment_author_url ); ?>" />
71+
<input type="text" id="newcomment_author_url" name="newcomment_author_url" size="30" class="code" value="<?php echo esc_url( $comment->comment_author_url ); ?>" />
7272
</td>
7373
</tr>
7474
</tbody>

src/wp-admin/includes/update-core.php

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -778,6 +778,56 @@
778778
'wp-includes/blocks/block/editor.min.css',
779779
'wp-includes/blocks/block/editor-rtl.css',
780780
'wp-includes/blocks/block/editor-rtl.min.css',
781+
/*
782+
* 6.7
783+
*
784+
* WordPress 6.7 included a SimplePie upgrade that included a major
785+
* refactoring of the file structure and library. The old files are
786+
* split in to two sections to account for this: files and directories.
787+
*
788+
* See https://core.trac.wordpress.org/changeset/59141
789+
*/
790+
// 6.7 - files
791+
'wp-includes/js/dist/interactivity-router.asset.php',
792+
'wp-includes/js/dist/interactivity-router.js',
793+
'wp-includes/js/dist/interactivity-router.min.js',
794+
'wp-includes/js/dist/interactivity-router.min.asset.php',
795+
'wp-includes/js/dist/interactivity.js',
796+
'wp-includes/js/dist/interactivity.min.js',
797+
'wp-includes/js/dist/vendor/react-dom.min.js.LICENSE.txt',
798+
'wp-includes/js/dist/vendor/react.min.js.LICENSE.txt',
799+
'wp-includes/js/dist/vendor/wp-polyfill-importmap.js',
800+
'wp-includes/js/dist/vendor/wp-polyfill-importmap.min.js',
801+
'wp-includes/sodium_compat/src/Core/Base64/Common.php',
802+
'wp-includes/SimplePie/Author.php',
803+
'wp-includes/SimplePie/Cache.php',
804+
'wp-includes/SimplePie/Caption.php',
805+
'wp-includes/SimplePie/Category.php',
806+
'wp-includes/SimplePie/Copyright.php',
807+
'wp-includes/SimplePie/Core.php',
808+
'wp-includes/SimplePie/Credit.php',
809+
'wp-includes/SimplePie/Enclosure.php',
810+
'wp-includes/SimplePie/Exception.php',
811+
'wp-includes/SimplePie/File.php',
812+
'wp-includes/SimplePie/gzdecode.php',
813+
'wp-includes/SimplePie/IRI.php',
814+
'wp-includes/SimplePie/Item.php',
815+
'wp-includes/SimplePie/Locator.php',
816+
'wp-includes/SimplePie/Misc.php',
817+
'wp-includes/SimplePie/Parser.php',
818+
'wp-includes/SimplePie/Rating.php',
819+
'wp-includes/SimplePie/Registry.php',
820+
'wp-includes/SimplePie/Restriction.php',
821+
'wp-includes/SimplePie/Sanitize.php',
822+
'wp-includes/SimplePie/Source.php',
823+
// 6.7 - directories
824+
'wp-includes/SimplePie/Cache/',
825+
'wp-includes/SimplePie/Content/',
826+
'wp-includes/SimplePie/Decode/',
827+
'wp-includes/SimplePie/HTTP/',
828+
'wp-includes/SimplePie/Net/',
829+
'wp-includes/SimplePie/Parse/',
830+
'wp-includes/SimplePie/XML/',
781831
);
782832

783833
/**

src/wp-content/themes/twentytwenty/assets/css/editor-style-block-rtl.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -791,7 +791,7 @@ hr.wp-block-separator.is-style-dots::before {
791791
/* Block: Pullquote -------------------------- */
792792

793793
.editor-styles-wrapper .wp-block-pullquote {
794-
border: none;
794+
border: 0 solid;
795795
color: inherit;
796796
padding: 0;
797797
position: relative;

src/wp-content/themes/twentytwenty/assets/css/editor-style-block.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -795,7 +795,7 @@ hr.wp-block-separator.is-style-dots::before {
795795
/* Block: Pullquote -------------------------- */
796796

797797
.editor-styles-wrapper .wp-block-pullquote {
798-
border: none;
798+
border: 0 solid;
799799
color: inherit;
800800
padding: 0;
801801
position: relative;

src/wp-includes/feed.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -842,7 +842,7 @@ function fetch_feed( $url ) {
842842
do_action_ref_array( 'wp_feed_options', array( &$feed, $url ) );
843843

844844
$feed->init();
845-
$feed->set_output_encoding( get_option( 'blog_charset' ) );
845+
$feed->set_output_encoding( get_bloginfo( 'charset' ) );
846846

847847
if ( $feed->error() ) {
848848
return new WP_Error( 'simplepie-error', $feed->error() );

src/wp-includes/functions.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3417,6 +3417,7 @@ function wp_get_image_mime( $file ) {
34173417
* @since 4.2.0 Support was added for GIMP (.xcf) files.
34183418
* @since 4.9.2 Support was added for Flac (.flac) files.
34193419
* @since 4.9.6 Support was added for AAC (.aac) files.
3420+
* @since 6.8.0 Support was added for `audio/x-wav`.
34203421
*
34213422
* @return string[] Array of mime types keyed by the file extension regex corresponding to those types.
34223423
*/
@@ -3481,7 +3482,7 @@ function wp_get_mime_types() {
34813482
'mp3|m4a|m4b' => 'audio/mpeg',
34823483
'aac' => 'audio/aac',
34833484
'ra|ram' => 'audio/x-realaudio',
3484-
'wav' => 'audio/wav',
3485+
'wav|x-wav' => 'audio/wav',
34853486
'ogg|oga' => 'audio/ogg',
34863487
'flac' => 'audio/flac',
34873488
'mid|midi' => 'audio/midi',

src/wp-includes/html-api/class-wp-html-processor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -902,7 +902,7 @@ public function expects_closer( ?WP_HTML_Token $node = null ): ?bool {
902902
// Doctype declarations.
903903
'html' === $token_name ||
904904
// Void elements.
905-
self::is_void( $token_name ) ||
905+
( 'html' === $token_namespace && self::is_void( $token_name ) ) ||
906906
// Special atomic elements.
907907
( 'html' === $token_namespace && in_array( $token_name, array( 'IFRAME', 'NOEMBED', 'NOFRAMES', 'SCRIPT', 'STYLE', 'TEXTAREA', 'TITLE', 'XMP' ), true ) ) ||
908908
// Self-closing elements in foreign content.
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
<?php
2+
/**
3+
* Tests the `fetch_feed` function.
4+
*
5+
* @package WordPress
6+
* @subpackage UnitTests
7+
* @since 6.7.0
8+
*
9+
* @group feed
10+
*/
11+
class Tests_Feed_fetchFeed extends WP_UnitTestCase {
12+
13+
public function set_up() {
14+
parent::set_up();
15+
16+
add_filter( 'pre_http_request', array( $this, 'mocked_rss_response' ) );
17+
}
18+
19+
/**
20+
* @ticket 62354
21+
*/
22+
public function test_empty_charset_does_not_trigger_fatal_error() {
23+
add_filter( 'pre_option_blog_charset', '__return_empty_string', 20 );
24+
25+
$feed = fetch_feed( 'https://wordpress.org/news/feed/' );
26+
27+
foreach ( $feed->get_items( 0, 1 ) as $item ) {
28+
$content = $item->get_content();
29+
}
30+
31+
$this->assertStringContainsString( '<a href="https://learn.wordpress.org/">Learn WordPress</a> is a learning resource providing workshops, quizzes, courses, lesson plans, and discussion groups so that anyone, from beginners to advanced users, can learn to do more with WordPress.', $content );
32+
}
33+
34+
public function mocked_rss_response() {
35+
$single_value_headers = array(
36+
'Content-Type' => 'application/rss+xml; charset=UTF-8',
37+
'link' => '<https://wordpress.org/news/wp-json/>; rel="https://api.w.org/"',
38+
);
39+
40+
return array(
41+
'headers' => new WpOrg\Requests\Utility\CaseInsensitiveDictionary( $single_value_headers ),
42+
'body' => file_get_contents( DIR_TESTDATA . '/feed/wordpress-org-news.xml' ),
43+
'response' => array(
44+
'code' => 200,
45+
'message' => 'OK',
46+
),
47+
'cookies' => array(),
48+
'filename' => null,
49+
);
50+
}
51+
}

tests/phpunit/tests/html-api/wpHtmlProcessor-bookmark.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,23 @@ public function test_seek_back_from_foreign_content( callable $factory ) {
129129
$this->assertSame( array( 'HTML', 'BODY', 'CUSTOM-ELEMENT', 'SVG', 'RECT' ), $processor->get_breadcrumbs() );
130130
}
131131

132+
/**
133+
* Covers a regression where the root node may not be present on the stack of open elements.
134+
*
135+
* Heading elements (h1, h2, etc.) check the current node on the stack of open elements
136+
* and expect it to be defined. If the root-node has been popped, pushing a new heading
137+
* onto the stack will create a warning and fail the test.
138+
*
139+
* @ticket 62290
140+
*/
141+
public function test_fragment_starts_with_h1() {
142+
$processor = WP_HTML_Processor::create_fragment( '<h1>' );
143+
$this->assertTrue( $processor->next_tag( 'H1' ) );
144+
$this->assertTrue( $processor->set_bookmark( 'mark' ) );
145+
$this->assertTrue( $processor->next_token() );
146+
$this->assertTrue( $processor->seek( 'mark' ) );
147+
}
148+
132149
/**
133150
* Data provider.
134151
*

0 commit comments

Comments
 (0)