Title: Escaping characters for list display filter?
Last modified: August 21, 2016

---

# Escaping characters for list display filter?

 *  [Malachi Healey](https://wordpress.org/support/users/malachi-healey/)
 * (@malachi-healey)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/list-shortcode/)
 * I have this shortcode,
 * `[pdb_list fields="strategy, symbol, date_entered, entry_price, adjustments" 
   filter='symbol=s&p*&exit_price=']`
 * I have values in the symbols field like SPX1, SPX2, SPX3 etc., and this same 
   filter shortcode is working fine when I filter for these other symbols. The problem
   is that since the **S&P#** value has a **&** in it the plugin recognizes that
   as an attempt to chain filters, causing it not to display.
 * Is there any way to escape the filter string? I have tried different forms of
   quotes and backslashes to try and I would like this to be doable without having
   to have clients have to adopt and spend time and money changing things to SNP#
   or something.
 * [http://wordpress.org/plugins/participants-database/](http://wordpress.org/plugins/participants-database/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Thread Starter [Malachi Healey](https://wordpress.org/support/users/malachi-healey/)
 * (@malachi-healey)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/list-shortcode/#post-4423246)
 * I didn’t find a way to escape string but I did find an adequate work around by
   filtering out what I didn’t need instead of what I needed.
 * For those concerned
 * `[pdb_list fields="strategy, symbol, date_entered, entry_price, adjustments" 
   filter='symbol!spx*&symbol!stock*&symbol!WHATEVERIWANT&exit_price=']`
 *  Plugin Author [Roland Barker](https://wordpress.org/support/users/xnau/)
 * (@xnau)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/list-shortcode/#post-4423279)
 * Thanks for pointing this out. Actually, the ampersand shouldn’t be allowed in
   a field name, an oversight on my part. That wouldn’t affect your frontend, the
   title of a field can be any string you want to use, and that’s the only thing
   anybody ever sees.
 * If you hadn’t solved it yourself, I would have suggested changing the name of
   the field. This wouldn’t have changed anything for your customers, the name is
   only used internally. If you do want to change the name, you have to edit it 
   in the database directly in the two places it’s used: the fields table and as
   a column name in the main database table.
 *  Plugin Author [Roland Barker](https://wordpress.org/support/users/xnau/)
 * (@xnau)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/list-shortcode/#post-4423290)
 * On second thought…ampersands already aren’t allowed in field names…so are you
   sure the real name of the field is ‘s&p’? It’s probably ‘sandp’ take a look on
   the manage database fields page and see what the name (not title) of your field
   is.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Escaping characters for list display filter?’ is closed to new replies.

 * ![](https://ps.w.org/participants-database/assets/icon-256x256.jpg?rev=1389807)
 * [Participants Database](https://wordpress.org/plugins/participants-database/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/participants-database/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/participants-database/)
 * [Active Topics](https://wordpress.org/support/plugin/participants-database/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/participants-database/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/participants-database/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Roland Barker](https://wordpress.org/support/users/xnau/)
 * Last activity: [12 years, 6 months ago](https://wordpress.org/support/topic/list-shortcode/#post-4423290)
 * Status: not resolved