Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

registerplug auto escapes html

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Plugins
View previous topic :: View next topic  
Author Message
3zaps
Smarty n00b


Joined: 15 Jun 2012
Posts: 2

PostPosted: Fri Jun 15, 2012 10:51 am    Post subject: registerplug auto escapes html Reply with quote

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
View user's profile Send private message
3zaps
Smarty n00b


Joined: 15 Jun 2012
Posts: 2

PostPosted: Fri Jun 15, 2012 2:12 pm    Post subject: Reply with quote

Solved - Was actually an ajax issue which cause the browser to display the code escaped so smarty was working great as normal Wink
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Plugins All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP