Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4014406
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T09:29:35+00:00 2026-05-20T09:29:35+00:00

I am using this in my tpl file , like {strip_tags({$obj->getfunc()})} and it gives

  • 0

I am using this in my tpl file , like

{strip_tags({$obj->getfunc()})}

and it gives mes error like syntax error: unrecognized tag:

is anything wrong with the syntax ??

full error message

<b>Fatal error</b>:  Smarty error: [in file.tpl line 7]: syntax error: unrecognized tag: strip_tags({$obj->getfunc() 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T09:29:35+00:00Added an answer on May 20, 2026 at 9:29 am

    Your code:

    strip_tags({$obj->getfunc()})
    

    The problem here is the {} curly braces. I don’t know why you thought you needed these, but they’re not required.

    [edit]

    I see you’ve edited the question/comments to note that you’re using Smarty. Now the curly braces make sense.

    I guess you started off with just {$obj->getfunc()}, and decided to do strip_tags() on it to prevent hacks.

    The {} braces are part of Smarty, so you should only use them this way for the entire block of code. So you need them outside of the `strip_tags() function, and not inside, on the method call as you had it previously.

    So instead of this strip_tags({$obj->getfunc()}), you should have something like this:

    {strip_tags($obj->getfunc())}
    

    Hope that helps.

    [edit 2]

    Okay, I’m a PHP dev, not a smarty dev. The code above is valid PHP (not counting the {} braces). But maybe smarty doesn’t like that.

    I googled and found this page on the Smarty website: http://www.smarty.net/docs/en/language.modifier.strip.tags.tpl

    That page gives some specific Smarty syntax for strip_tags, so based on that, it looks like you code should look like this:

    {$obj->getfunc()|strip_tags}
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I embedded flash to my site using this: print swf('myflash.swf'); into my page.tpl file
Using this file as source, I have a situation where I need to retrieve
I'm using drupal 6. I've managed to make a .tpl file for one content
Using a code snippet like: sp = getSpotifyApi(1); var models = sp.require(sp://import/scripts/api/models); var tpl
I have been using a custom template file called user-profile.tpl.php for a while. But
In a .tpl file, I'm using a smarty foreach to concatenate values from an
using this http://bl.ocks.org/950642 we can see how to add images to nodes, the question
Using this to load the json var jsonParsed = JSON.parse(localStorage.getItem('test')); Using this to save
Using this page, http://developer.android.com/sdk/compatibility-library.html , I have installed the Android Support Package, added a
Using this C# application pick a start and ending date range, that SAP will

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.