Skip Menu |
 

This queue is for tickets about the HTML-Tree CPAN distribution.

Report information
The Basics
Id: 17329
Status: resolved
Priority: 0/
Queue: HTML-Tree

People
Owner: Nobody in particular
Requestors: andy [...] petdance.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



X-Scanned-BY: AMaViS-ng at bestpractical
MIME-Version: 1.0 (Apple Message framework v746.2)
X-Spam-Status: No, hits=-2.5 required=8.0 tests=BAYES_00,HTML_90_100,HTML_MESSAGE,SPF_PASS
X-Mailer: Apple Mail (2.746.2)
Received-SPF: pass (x1.develooper.com: domain of andy [...] petdance.com designates 64.81.227.163 as permitted sender)
X-Virus-Checked: Checked
References: <a8e52b650601271535w720e63eehd48e2c080ca689b5 [...] mail.gmail.com>
Content-Type: multipart/alternative; boundary=Apple-Mail-1--950185567
Received: from localhost (localhost.localdomain [127.0.0.1]) by diesel.bestpractical.com (Postfix) with ESMTP id 491CC4D83E1 for <cpan-bug+html-tree [...] diesel.bestpractical.com>; Fri, 27 Jan 2006 22:18:44 -0500 (EST)
Received: from la.mx.develooper.com (x1.develooper.com [63.251.223.170]) by diesel.bestpractical.com (Postfix) with SMTP id B95334D83E0 for <bug-html-tree [...] rt.cpan.org>; Fri, 27 Jan 2006 22:18:43 -0500 (EST)
Received: (qmail 21999 invoked by alias); 28 Jan 2006 03:18:10 -0000
Received: from rocket.petdance.com (HELO rocket.petdance.com) (64.81.227.163) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Fri, 27 Jan 2006 19:18:01 -0800
Received: from [192.168.2.4] (mook.petdance.com [192.168.2.4]) by rocket.petdance.com (Postfix) with ESMTP id 3AA6B2E0301 for <bug-html-tree [...] rt.cpan.org>; Fri, 27 Jan 2006 21:17:52 -0600 (CST)
Delivered-To: cpan-bug+html-tree [...] diesel.bestpractical.com
Subject: Fwd: HTML::Tree - literal attributes get escaped anyway [PATCH]
Return-Path: <andy [...] petdance.com>
X-Original-To: cpan-bug+html-tree [...] diesel.bestpractical.com
X-Spam-Check-BY: la.mx.develooper.com
Date: Fri, 27 Jan 2006 21:18:07 -0600
Message-Id: <366199BA-F2F8-487B-A14B-D5AC8D28381F [...] petdance.com>
To: bug-html-tree [...] rt.cpan.org
From: Andy Lester <andy [...] petdance.com>
Content-Length: 0
Content-Type: text/plain; charset=UTF-8; delsp=yes; format=flowed
Content-Transfer-Encoding: quoted-printable
X-RT-Original-Encoding: utf-8
Content-Length: 2060
Begin forwarded message: Show quoted text
> From: Terrence Brannon <metaperl@gmail.com> > Date: January 27, 2006 5:35:54 PM CST > To: Andy Lester <andy@petdance.com> > Subject: Fwd: HTML::Tree - literal attributes get escaped anyway > [PATCH] > > Ok, I b0rked your email address on the last send. This will make it > to you. > > ---------- Forwarded message ---------- > From: Terrence Brannon <metaperl@gmail.com> > Date: Jan 27, 2006 3:34 PM > Subject: Re: HTML::Tree - literal attributes get escaped anyway > [PATCH] > To: andy@petdance.coml > Cc: libwww@perl.org > > > Ok test case now passes. Attached file updates Changes, a test case > and HTML/Element.pm as needed. > > On 1/27/06, Terrence Brannon <metaperl@gmail.com> wrote:
>> I have added a test to the HTML-Tree svn and plan to post a fix by >> the >> end of the day, but thought I would give everyone a heads up first. >> >> The idea is that sometimes you want to toss a bit of javascript into >> an attribute. For example, we want the onclick attribute to look like >> this: >> >> <tr class="alternate" onclick="window.location.href='/report/ >> fullcsv'"> >> >> but that is currently impossible. It gets rendered like this: >> >> <tr class="alternate" onclick="window.location.href=&#39;/report/ >> fullcsv&#39;"> >> >> If you try to set the attribute value to a super-literal, then the >> object just gets stringified: >> >> <tr class="alternate" onclick="HTML::Element=HASH(0x8311dcc)"> >> >> So my strategy is to recognize a super-literal and put >> $literal->{text} in as the value of the attribute without calling the >> encode_entities() routine. >> >> That's all for now... more later (hopefully in an hour or two), >> -- >> Play me in correspondence chess: >> http://slowchess.com/profile.php?username=tbrannon >>
> > > -- > Play me in correspondence chess: > http://slowchess.com/profile.php?username=tbrannon > > > > > -- > Play me in correspondence chess: > http://slowchess.com/profile.php?username=tbrannon
-- Andy Lester => andy@petdance.com => www.petdance.com => AIM:petdance
Content-Type: multipart/mixed; boundary=Apple-Mail-2--950185566
Content-Length: 0
Content-Type: text/html; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable
X-RT-Original-Encoding: US-ASCII
Content-Length: 9135


Begin forwarded message:

Show quoted text
From: Terrence Brannon <metaperl@gmail.com>
Date: January 27, 2006 5:35:54 PM CST
To: Andy Lester <andy@petdance.com>
Subject: Fwd: HTML::Tree - literal attributes get escaped anyway [PATCH]

Ok, I b0rked your email address on the last send. This will make it to you.

---------- Forwarded message ----------
From: Terrence Brannon <metaperl@gmail.com>
Date: Jan 27, 2006 3:34 PM
Subject: Re: HTML::Tree - literal attributes get escaped anyway [PATCH]


Ok test case now passes. Attached file updates Changes, a test case
and HTML/Element.pm as needed.

On 1/27/06, Terrence Brannon <metaperl@gmail.com> wrote:
I have added a test to the HTML-Tree svn and plan to post a fix by the
end of the day, but thought I would give everyone a heads up first.

The idea is that sometimes you want to toss a bit of javascript into
an attribute. For example, we want the onclick attribute to look like
this:

<tr class="alternate" onclick="window.location.href='/report/fullcsv'">

but that is currently impossible. It gets rendered like this:

<tr class="alternate" onclick="window.location.href=&#39;/report/fullcsv&#39;">

If you try to set the attribute value to a super-literal, then the
object just gets stringified:

<tr class="alternate" onclick="HTML::Element=HASH(0x8311dcc)">

So my strategy is to recognize a super-literal and put
$literal->{text} in as the value of the attribute without calling the
encode_entities() routine.

That's all for now... more later (hopefully in an hour or two),
--
Play me in correspondence chess:



--
Play me in correspondence chess:




--
Play me in correspondence chess:
content-type: text/plain; charset="utf-8"; name="patch.txt"; x-unix-mode="0666"
content-disposition: attachment; filename="patch.txt"
Content-Transfer-Encoding: 7bit
X-RT-Original-Encoding: ascii
Content-Length: 2862
Download patch.txt
text/plain 2.7k

Message body is not shown because sender requested not to inline it.

Content-Type: text/html; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable
X-RT-Original-Encoding: US-ASCII
Content-Length: 1421
Show quoted text

--
Andy Lester => andy@petdance.com => www.petdance.com => AIM:petdance



MIME-Version: 1.0
In-Reply-To: <366199BA-F2F8-487B-A14B-D5AC8D28381F [...] petdance.com>
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Disposition: inline
Message-Id: <rt-3.6.HEAD-25562-1163284412-373.17329-0-0 [...] rt.cpan.org>
References: <a8e52b650601271535w720e63eehd48e2c080ca689b5 [...] mail.gmail.com> <366199BA-F2F8-487B-A14B-D5AC8D28381F [...] petdance.com>
Content-Type: text/plain; charset="utf8"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Original-Encoding: utf-8
Content-Length: 27
Resolved in release 3.17_01


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.