--
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 php-fig+u...@googlegroups.com.
To post to this group, send email to php...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/4c634f36-bd9c-43d2-a387-90a47f4dad84%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
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;`.
-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 php-fig+u...@googlegroups.com.
To post to this group, send email to php...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/19262cbb-3697-4768-bcec-4a6ad16f2ff0%40googlegroups.com.
On Tue, Oct 4, 2016 at 4:18 PM Sara Golemon <p...@golemon.com> 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.
Maybe the aim of this PSR should be a test suite (or at least a data provider of common and edge cases for tests) instead of an interface: if your escaper pass all the tests, it's PSR-x compliant.This could be a really good standard, which any implementer can look up to to see if its implementation is up to the task.
What if my templates use objects?
--
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 php-fig+u...@googlegroups.com.
To post to this group, send email to php...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/08a4aa53-7fd1-46db-a237-2a1d2fed43fd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.