0

I am currently using CF11 cfsearch on our website to retrieve products. However, if the product name has ANY special characters it generates an error.

We have products that have a hash, plus, exclamation signs and some with backslashes. How do I get cfsearch to search using these special symbols?

  • 5
    *it generates an error.* Please post a small example of the code in question and the actual error message. https://stackoverflow.com/help/mcve – SOS Dec 28 '17 at 20:11
  • Can you also provide a code example of what you are using to perform the search? – Shawn Dec 28 '17 at 21:40

1 Answers1

0

I used something like this back in the day to solve <cfsearch> special character issues: https://cflib.org/udf/verityClean

You can start with dropping this in, and then tweak the regex if you continue to see issues with other special characters. It also depends if you are using Verity/Solr/etc. to know what characters will cause issues, so you may want to look into what characters cause issues for the engine/collection you are using.

Kyle Dodge
  • 834
  • 7
  • 17