Sigurd Magnusson wrote:
> Sorry guys as Hamish points out on the ticket comment there
> wasn't time [...]
I accept that it's not part of 3.0.1 (thanks to Hamish for the detailed
explanation), my next goal is to get it into 3.0(.2) as soon as possible.
To do that, I would really like to start a discussion about where
escaping should happen and what code paths should be allowed to bypass it.
Unfortunately, this seems to be a bug where everyone agrees that it is
important, but nobody wants to make any decisions ;-). My proposed fix
is publicly available and I have explained the advantages and
disadvantages that I see. I now would like to get feedback on my
proposal as well as alternative ones.
I think the problem of where to escape applies to a lot of different
places, which is why I want to have the discussion about it in public.
I am actually quite fond of my approach - it might not be the best fit
in this situation, but I think the general direction is correct: Escape
everything, except for objects that promise to do that themselves (by
providing forTemplate(), XML() or something like that).
The dogmatic approach would be to provide an object that wraps a string,
knows what needs to be escaped and provides the methods needed to escape
it for XML output (as well as DB and any other output). The framework
would then never directly output strings, instead relying on these
wrapper objects.
Yours
Jakob