On Tue, Oct 4, 2016 at 4:18 PM Sara Golemon <[email protected]> wrote:
> On Tuesday, October 4, 2016 at 9:40:03 AM UTC-7, Korvin Szanto wrote: > > Are you thinking like a text filter PSR or more of an output management > PSR? It sounds like a single interface with a single method to me: > `FilterInterface::filter($mixed): mixed;`. > > > There's many different forms of filtering: > * Pass filtering (removing of illegal sequences) > * Replacement filtering (transformation of illegal sequences with > placeholders) > * Panic filtering (raise an exception on illegal sequences) > * Escaping (included because it's often conflated with filtering) > > There are whitelist and blacklist variants of these. There are also > context sensitive issues for many of these; What's illegal in a JS context > isn't the same as an HTML text context, or an HTML attribute context. > > I don't know that we need standards for these permutations, but I imagine > it's a little more than "single interface with a single method". > Fair enough, until January my head is still in FIG 2.0 mode. I still would say that the examples you provide can fit into a single interface, but I do see that with FIG 3.0 our scope is probably a little bit different than lowest-common-denominator interface. @Chris I like the idea so far. Escaping is certainly an issue we've had in concrete5 and it's something we've tried to solve in the past with mixed results. One thing that I'd say is it that this kind of filtering might go hand in hand with validation as well. Best wishes, Korvin > -Sara > > -- > You received this message because you are subscribed to the Google Groups > "PHP Framework Interoperability Group" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/php-fig/19262cbb-3697-4768-bcec-4a6ad16f2ff0%40googlegroups.com > <https://groups.google.com/d/msgid/php-fig/19262cbb-3697-4768-bcec-4a6ad16f2ff0%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "PHP Framework Interoperability Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/CANeXGWXfc1eh-o2e78DRj-Wux4C5Tn5vDFXCJxp0c%2BAS1L7CrA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
