Results 1 to 3 of 3

Thread: Is strip_tags() in search.php working?

  1. #1
    Thread Starter
    Rookie elmirage001's Avatar
    Join Date
    Jun 2011
    Location
    United States
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Is strip_tags() in search.php working?

    I was checking the search form to see if it stripped out potentially harmful code added to search strings. I see strip_tags and esc_attr in the code on search.php that is supposed to do this.

    search.php
    <?php printf( __("Search for '%s' returned %s results",'appthemes'), trim( strip_tags( esc_attr( get_search_query() ) ) ), $wp_query->found_posts ); ?>
    If I search for <b>boat</b> it does not strip it out and the following is displayed.

    Output
    Search for '<b>boat</b>' returned 0 results
    I don't know enough yet to know if it's working correctly and just want to make sure our searches are being sanitized properly.

    Thank you!

  2. #2
    jomarkosabel's Avatar
    Join Date
    Mar 2009
    Location
    Philippines
    Posts
    37,828
    Thanks
    161
    Thanked 3,094 Times in 2,968 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!
    Please help our moderating team work more efficiently by not sending us support questions via PM. You can read more about how AppThemes support works here. However, you can send a PM to follow up and remind me if I missed your support request/thread.

    Thank you and have a nice day.

  3. #3
    Thread Starter
    Rookie elmirage001's Avatar
    Join Date
    Jun 2011
    Location
    United States
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Search not working right
    By optagon66 in forum Report JobRoller Bugs
    Replies: 4
    Last Post: June 3rd, 2011, 09:20 AM
  2. Search Box on Job Roller not working
    By ginolancaster in forum Report JobRoller Bugs
    Replies: 3
    Last Post: January 24th, 2011, 03:59 AM
  3. Search not working properly
    By amansaluja in forum Report ClassiPress Bugs
    Replies: 3
    Last Post: September 27th, 2010, 06:44 AM
  4. Quick search not working?
    By diabel in forum Report ClassiPress Bugs
    Replies: 3
    Last Post: April 9th, 2010, 01:23 AM