M2: protect embedded javascript against DollarDot Plugin

Oliver Paukstadt <[email protected]>
Newsgroups gmane.comp.web.mason.user
Message-ID <[email protected]>
Hello,

I am using H::M for a long time and started to play with M2 now.
While doing some experiments porting one of my sites I had to embed some
jQuery code:
<%class>
method javascript {return $self->SUPER::javascript() . q{
$.get("/news", {}, function(d) {
                $("#news").append(d);
        });
}; };
</%class>
This results in
 $self->get ("/news", {}, function(d) {
after processing.
Any idea how to protect or preserve the jquery DollarDot inside single
quotes?
$}.q{.get("/news", ... is really ugly and octal encodings are only
available in interpolating double quotes.

Greetings
Oliver
-- 
Oliver Paukstadt <[email protected]>


------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.