Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/wp-includes/class-wp-scripts.php
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ public function print_extra_script( $handle, $display = true ) {
}

$output .= sprintf(
"\n//# sourceURL=inline:%s",
"\n//# sourceURL=%s",
rawurlencode( "{$handle}-js-extra" )
);

Expand Down Expand Up @@ -527,7 +527,7 @@ public function get_inline_script_data( $handle, $position = 'after' ) {
}

$data[] = sprintf(
'//# sourceURL=inline:%s',
'//# sourceURL=%s',
rawurlencode( "{$handle}-js-{$position}" )
);

Expand Down
2 changes: 1 addition & 1 deletion src/wp-includes/class-wp-styles.php
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ public function print_inline_style( $handle, $display = true ) {
}

$output[] = sprintf(
'/*# sourceURL=inline:%s */',
'/*# sourceURL=%s */',
rawurlencode( "{$handle}-inline-css" )
);

Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/tests/blocks/editor.php
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,7 @@ public function test_ensure_preload_data_script_tag_closes() {
<script src="{$baseurl}/wp-includes/js/dist/api-fetch.min.js?ver=test" id="wp-api-fetch-js"></script>
<script id="wp-api-fetch-js-after">
wp.apiFetch.use( wp.apiFetch.createPreloadingMiddleware( {"/test/v0/test-62797":{"body":["Unclosed comment and a script open tag \\u003C!--\\u003Cscript\\u003E"],"headers":{"Allow":"GET"}}} ) );
//# sourceURL=inline:wp-api-fetch-js-after
//# sourceURL=wp-api-fetch-js-after
</script>

HTML;
Expand Down
Loading
Loading