MyVoucherCodes does not Like Sex

One of the side effects of testing is you develop a distrust of most software products, especially web sites. It’s a bit like the critic who can never really enjoy a show because he can never snap out of “review mode”. So it’s with some trepidation that I ever enter any punctuation marks into search fields, especially that most-abused of marks the apostrophe. Combine that with the fact that conscientious developers should always escape/strip quotation marks when passing user input to a query and you get this:

http://www.myvouchercodes.co.uk/code-store-search/domino’s

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘s’) AND c.title NOT LIKE ‘%sex%’ AND c.is_archived=’0′ AND c.is_expired=’0′ at line 4

The gem is unintentionally revealing how puritan your search facility is :)

Update: they’ve fixed this one now.