|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
3zaps Smarty n00b
Joined: 15 Jun 2012 Posts: 2
|
Posted: Fri Jun 15, 2012 10:51 am Post subject: registerplug auto escapes html |
|
|
I'm trying to implement reCaptcha using a smarty plugin with smarty Smarty-3.1.8: IE
function smartyRecaptcha_get_html($params, $smarty) {
global $config;
return recaptcha_get_html($config['RECAPTCHA']['RECAPTCHA_PUB']);
}
$smarty->registerPlugin("function","reCAPTCHA", "smartyRecaptcha_get_html");
This works but the return is auto html escaped meaning the javascript etc won't function.
I've tried the various nofilter options but these only seem to apply to variables not functions.
{reCAPTCHA} <- Escaped
{reCAPTCHA nofilter} <- Error
I tried doing an assing in the smartyRecaptcha_get_html function to $code then:
{$code nofilter}
But that is also still escaped.
Anyone got any ideas? |
|
Back to top |
|
3zaps Smarty n00b
Joined: 15 Jun 2012 Posts: 2
|
Posted: Fri Jun 15, 2012 2:12 pm Post subject: |
|
|
Solved - Was actually an ajax issue which cause the browser to display the code escaped so smarty was working great as normal |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|