Skip Menu |

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

Report information
The Basics
Id: 35801
Status: new
Priority: 0/
Queue: HTML-Prototype

People
Owner: Nobody in particular
Requestors: ahitrov [...] mail.ru
Cc:
AdminCc:

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



Subject: Bug in description
Date: Mon, 12 May 2008 14:58:37 +0400
To: bug-HTML-Prototype [...] rt.cpan.org
From: Andrew Hitrov <ahitrov [...] realigion.ru>
Hello, comrades. Subject: http://search.cpan.org/~esskar/HTML-Prototype-1.48/lib/HTML/Prototype.pm Placeholder: Function decription $prototype->link_to_function( $name, $function, \%html_options ) $prototype->link_to_remote( $content, \%options, \%html_options ) There are some bugs in examples (in all the same examples) Function call: $prototype->link_to_function( '<img src="really.png"/>', 'do_delete()', { entities => '' } ) or $prototype->link_to_remote( '<img src="refresh.png"/>', { update => 'emails', url => 'http://localhost/refresh/' } ) will never show the image in HTML page context. Instead it will escape all the < and > symbols. It comes from using of HTML::Element class. As I found from code examining, the string inside of '<a>' HTML::Element will automatically escaped. How to resolve: The right use of this function is to use an HTML::Element instead of string. Here is an example: my $imgl = HTML::Element->new('img', 'src' => '/i/pager-arr-lft.png' ); my $link = $prototype->link_to_remote ($imgl, { update => 'content_main', url => '/community/'.$filter.'/?js=1&p='.($p-1), }, ); -- Trully Yours, Andrew Hitrov mailto:ahitrov@realigion.ru Rambler Lead Programmer