Skip to content

Commit

Permalink
Decode some characters if used in taxonomy name so it's displayed cor…
Browse files Browse the repository at this point in the history
…rectly in Query Loop filters (#50376)

* Decode ampersand if used in taxonomy name so it's displayed correctly in Query Loop filters

* Use more generic decoding function and in the displayTransform props of FormTokenField
  • Loading branch information
kmanijak authored Nov 30, 2023
1 parent 19c0de9 commit 9473d62
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { useSelect } from '@wordpress/data';
import { store as coreStore } from '@wordpress/core-data';
import { useState, useEffect } from '@wordpress/element';
import { useDebounce } from '@wordpress/compose';
import { decodeEntities } from '@wordpress/html-entities';

/**
* Internal dependencies
Expand Down Expand Up @@ -177,6 +178,7 @@ function TaxonomyItem( { taxonomy, termIds, onChange } ) {
value={ value }
onInputChange={ debouncedSearch }
suggestions={ suggestions }
displayTransform={ decodeEntities }
onChange={ onTermsChange }
__experimentalShowHowTo={ false }
/>
Expand Down

0 comments on commit 9473d62

Please sign in to comment.