Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

Re: HTML::Tree - literal attributes get escaped anyway [PATCH]: msg#00024

lang.perl.modules.lwp

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@xxxxxxxxx> 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

Attachment: patch.txt
Description: Text document

<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
qnx.openqnx.dev...    gcc.libstdc++.c...    solaris.opensol...    information-ret...    misc.misterhous...    web.catalyst.ge...    apache.webservi...    redhat.release....    hardware.lirc/2...    kernel.autofs/2...    technology.sust...    linux.vdr/2003-...    editors.lyx.gen...    org.user-groups...    netbsd.devel.pk...    xdg.devel/2004-...    version-control...    jakarta.slide.d...    debian.packages...    creativecommons...    ports.ppc.embed...    bug-tracking.bu...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe