Fixes http://code.google.com/p/google-caja/issues/detail?id=1471
This change required passing an out-of-band "this attribute was
unspecified by the guest programmer" signal from TemplateCompiler to
HtmlAttributeRewriter. See changes for details of how this is done.
On 2012/05/23 22:53:58, ihab.awad wrote:
> > <a target=>
>
> FATAL_ERROR in the server side cajoler.
that seems wrong. the cajoler currently doesn't complain about that, and I can
find many instances of people writing target="", though it's not clear to me
what the intent of that is.
(target="") !== (target=)
I verified in the playground. What makes you think the cajoler doesn't
complain?
On Wed, May 23, 2012 at 4:52 PM, <felix8a@gmail.com> wrote:
> On 2012/05/23 22:53:58, ihab.awad wrote:
>
>> > <a target=>
>>
>
> FATAL_ERROR in the server side cajoler.
>>
>
> that seems wrong. the cajoler currently doesn't complain about that,
> and I can find many instances of people writing target="", though it's
> not clear to me what the intent of that is.
>
>
http://codereview.appspot.com/**6240043/<http://codereview.appspot.com/6240043/>
>
--
Ihab A.B. Awad, Palo Alto, CA
On Wed, May 23, 2012 at 4:55 PM, <ihab.awad@gmail.com> wrote:
> (target="") !== (target=)
>
> I verified in the playground. What makes you think the cajoler doesn't
> complain?
>
I tried
<a target=>hi</a>
at caja.appspot.com and it worked for me.
On Wed, May 23, 2012 at 4:59 PM, felix <felix8a@gmail.com> wrote:
> I tried
> <a target=>hi</a>
> at caja.appspot.com and it worked for me.
>
Oh weird. It worked for me too. What did *not* work for me was:
<a target= href="http://www.google.com/">hi</a>
and it complained with:
FATAL_ERROR unknown:///unknown:0+0: malformed xhtml: "http://www.google.com/
":
unknown:///unknown:0 <http://caja.appspot.com/?es5=false#>: <a target=
href="http://www.google.com/">hi</a>
so it seems it parses the "href=..." as the possible value of the "target"
attribute. Fwiw, the following does work (again, as with your case
"target=" is the last thing inside the angle brackets):
<a href="http://www.google.com/" target=>hi</a>
Ok, I'll add your case to the tests and resend.
Ihab
--
Ihab A.B. Awad, Palo Alto, CA
On Wed, May 23, 2012 at 5:11 PM, <ihab.awad@gmail.com> wrote:
>
> On Wed, May 23, 2012 at 4:59 PM, felix <felix8a@gmail.com> wrote:
>
>> I tried
>> <a target=>hi</a>
>> at caja.appspot.com and it worked for me.
>>
>
> Oh weird. It worked for me too. What did *not* work for me was:
>
> <a target= href="http://www.google.com/">hi</a>
>
>
>
> and it complained with:
>
> FATAL_ERROR unknown:///unknown:0+0: malformed xhtml: "
> http://www.google.com/":
> unknown:///unknown:0 <http://caja.appspot.com/?es5=false#>: <a target=
> href="http://www.google.com/">hi</a>
>
>
ah, yeah, iirc that's a weirdness with variant html parsing by old
browsers, which should be mostly irrelevant now, and caja is being weird
about what it accepts.
Issue 6240043: Fix handling of 'target' attributes
(Closed)
Created 14 years ago by ihab.awad
Modified 14 years ago
Reviewers: felix8a
Base URL: http://google-caja.googlecode.com/svn/trunk/
Comments: 1