Re: Sanitizing forms in vibe.d. How?

2016-12-15 Thread Adam D. Ruppe via Digitalmars-d-learn
On Monday, 12 December 2016 at 11:32:42 UTC, Nicholas Wilson wrote: for strip_tags I would look for an xml library (e.g. arsd.dom) and parse it and then reprint it without the tags. There's probably a better way to do it though. I'm sure Adam Ruppe will be able to help you there. Well, it

Re: Sanitizing forms in vibe.d. How?

2016-12-15 Thread Adam D. Ruppe via Digitalmars-d-learn
On Monday, 12 December 2016 at 10:25:05 UTC, aberba wrote: How about alternative to php strip_tags(), strip_slash() ? I wouldn't use those functions anyway in most cases: instead of stripping stuff, just encode it properly for the output. So, if it is being output to JSON or javascript,

Re: Sanitizing forms in vibe.d. How?

2016-12-12 Thread Bauss via Digitalmars-d-learn
On Monday, 12 December 2016 at 10:25:05 UTC, aberba wrote: On Monday, 12 December 2016 at 00:42:54 UTC, Nicholas Wilson wrote: On Sunday, 11 December 2016 at 18:30:54 UTC, aberba wrote: You can enforce that the string that you receive is an email address with `isEmail` from `std.net.isemail`

Re: Sanitizing forms in vibe.d. How?

2016-12-12 Thread Nicholas Wilson via Digitalmars-d-learn
On Monday, 12 December 2016 at 10:25:05 UTC, aberba wrote: On Monday, 12 December 2016 at 00:42:54 UTC, Nicholas Wilson wrote: On Sunday, 11 December 2016 at 18:30:54 UTC, aberba wrote: You can enforce that the string that you receive is an email address with `isEmail` from `std.net.isemail`

Re: Sanitizing forms in vibe.d. How?

2016-12-12 Thread aberba via Digitalmars-d-learn
On Monday, 12 December 2016 at 00:42:54 UTC, Nicholas Wilson wrote: On Sunday, 11 December 2016 at 18:30:54 UTC, aberba wrote: You can enforce that the string that you receive is an email address with `isEmail` from `std.net.isemail` Nice. What sql library are you using? there is probably

Re: Sanitizing forms in vibe.d. How?

2016-12-11 Thread Nicholas Wilson via Digitalmars-d-learn
On Sunday, 11 December 2016 at 18:30:54 UTC, aberba wrote: In php, I use built-in functions like filter_var(FILTER_VALIDATE_EMAIL, $email). There are other constants for different data types. You can enforce that the string that you receive is an email address with `isEmail` from