Vincent,

Was the test failure in a unit-test or the browser. I believe always
escaping & should work in all major browsers.

-Louis

On Thu, Mar 5, 2009 at 3:21 PM, Vincent Siveton <[email protected]> wrote:

> Hi again,
>
> 2009/3/5 Adam Winer <[email protected]>:
> > is going to be outrageously slow, as in the common case it involves
>
> Agree with you but...
>
> > allocating two expensive objects.  Can you roll this back and find a
> > more efficient implementation?  Like, for one possibility, comparing
> > the attribute name against a Set of known URL attribute names in HTML.
>
> It was my original idea but it doesn't guarantee that the text will be
> correctly escaped for all attributes.
>
> >  Or just always escaping &, since I'm not aware of a reason why &amp;
> > breaks attributes in HTML.
>
> Always escaping & doesn't work, I got a test failure, I don't remember
> which one.
>
> I could propose to check if the text seems like an url ie starting
> with http/https...
> If not, escape the &
>
> WDYT?
>
> Cheers,
>
> Vincent
>

Reply via email to