Wixel/GUMP — Issue #8: Quotes not correctly managed for validate_valid_name method
Author: ben-s
Created: 2012-01-18 09:15:53+00:00
State: open

As I suggested previously, it would be fine to be able to validate lastnames like "O'Hara".
The validate_valid_name aims to meet this requirement, but it fails when a simple quote is found.

I managed to get it working by adding the FLAG_NO_ENCODE_QUOTES flag to the filter_var() function in the sanitize() method and in the sanitize_string() filter.

Without this flag, the simple quote would be encoded in "'", and the preg_match would never match any lastname with simple quotes.

You have more hindsight on gump than me, so I let you decide if it this change is relevant or if it would be better to make this in another way.