Skip to content

Commit

Permalink
Make sure taxonomy non-latin base slugs are cached (#7114)
Browse files Browse the repository at this point in the history
  • Loading branch information
wordpressfan authored Nov 19, 2024
1 parent ef59fbd commit b29c4e2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion inc/Engine/Cache/TaxonomySubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,6 @@ private function is_not_valid_taxonomy_page() {
$term_link = trailingslashit( $term_link ) . 'page/' . get_query_var( 'paged' );
}

return untrailingslashit( $term_link ) !== untrailingslashit( $current_link );
return urldecode( untrailingslashit( $term_link ) ) !== urldecode( untrailingslashit( $current_link ) );
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -91,5 +91,16 @@
],
'can_cache' => false,
],
'testValidTaxonomyPageWithNonLatinCharactersInUrl' => [
'config' => [
'is_category' => true,
'is_tag' => false,
'is_tax' => false,
'current_term_id' => 1,
'current_term_link' => 'http://example.com/%D0%BF%D1%80%D0%BE%D0%B4%D1%83%D0%BA%D1%82%D0%BE%D0%B2%D0%B0-%D0%BA%D0%B0%D1%82%D0%B5%D0%B3%D0%BE%D1%80%D0%B8%D1%8F/test1',
'current_page_url' => 'http://example.com/продуктова-категория/test1/',
],
'can_cache' => true,
],
],
];

0 comments on commit b29c4e2

Please sign in to comment.