nliautaud / p01contact

Create contact forms by writing simple tags. Also a plugin for GetSimple and Pico CMS.
MIT License
16 stars 15 forks source link

Escape commas #6

Closed backit closed 7 years ago

backit commented 8 years ago

Hi, first of all thanks for your work. Inside the form i have a textarea "Notes" with a prefilled-value containing a comma. How could i escape the comma? p01contact thinks it's a field separator! I've already tried \ % ' ....

nliautaud commented 8 years ago

Hi, I didn't took a look for a while but I think that I didn't include an escaping mechanism. The parser is very rough but you should be able to modify the regex patterns around line 90 to add such feature. I definitively should have used a less usual separator than a comma, like at least a semicolon.

A workaround may be to use a similar unicode character like a single low-9 quotation mark.

backit commented 8 years ago

Ok, perfect, thanks.

2015-11-01 16:57 GMT+01:00 Nicolas Liautaud notifications@github.com:

Hi, I didn't took a look for a while but I think that I didn't include an escaping mechanism. The parser is very rough but you should be able to modify the regex patterns around line 90 https://github.com/nliautaud/p01contact/blob/3df5ef61c70d37ef793f9d9e15127ffe7e82183a/p01-contact/p01-contact.php#L90 to add such feature. I definitively should have used a less usual separator than a comma, like at least a semicolon.

A workaround may be to use a similar unicode character like a single low-9 quotation mark.

— Reply to this email directly or view it on GitHub https://github.com/nliautaud/p01contact/issues/6#issuecomment-152840224.