Results 1 to 2 of 2

Thread: htmlentities( ENT_QUOTES)

  1. #1
    Join Date
    Jul 2010
    Posts
    228
    Thanks
    18
    Thanked 0 Times in 0 Posts

    Default htmlentities( ENT_QUOTES)

    Good day!

    I want to know if how can I add the code for htmlentities in my code.
    PHP Code:
    $tpl->set_block('handle''block_list''tag_list');
    foreach(
    $rows as $row) {
        
    $tpl->set_var(array('emp_id'=> $row['Emp_ID'],
                            
    'lastname' => $row['Last_Name'],
                            
    'firstname' => $row['First_Name'],
                            
    'birthday' => date('d-m-Y'strtotime($row['Birthday'])),
                            
    'sorting' => $sort,
                            
    'id' => $row['Emp_ID']
        ));
        
        
    $tpl->parse('tag_list''block_list'true);
    }

    $tpl->parse('handle', array('handle'));
    $tpl->p('handle'); 
    Thank you
    Last edited by rhodarose; 05-12-2011 at 05:28 AM.

  2. #2
    Join Date
    Jul 2010
    Location
    Minnesota
    Posts
    256
    Thanks
    1
    Thanked 21 Times in 21 Posts

    Default

    Well the only things that should be vulnerable to html tags would be the first name and last name, everything else typically wouldn't be able to be set by the user.
    PHP Code:
    'lastname' => htmlentities($row['Last_Name']),
    'firstname' => htmlentities($row['First_Name']), 

  3. The Following User Says Thank You to fastsol1 For This Useful Post:

    rhodarose (05-12-2011)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •