![]() |
|
laziness, impatience, and hubris | |
PerlMonks |
Re: Re: Re: Template-output quoting (Warning: Contains JavaScript)by tachyon (Chancellor) |
on Dec 11, 2002 at 11:19 UTC ( #219060=note: print w/replies, xml ) | Need Help?? |
From what you are saying the way that the templating system is working is to arbirarily insert vars into the HTML as a pre-process. As such it can arbitrarily break your javascript before it can run. In this case by far the easiest solution, in fact probably the only solution will be to attack the source and send correctly escaped strings s/([^\w])/\\$1/g; The only other possible solution that occurs to me is trick the javascript thusly (pseudo code)
We trick the javacript to thinking that cheers tachyon s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print
In Section
Seekers of Perl Wisdom
|
|