Results 1 to 3 of 3

Thread: Stripping tags from rssdisplaybox results?

  1. #1
    Join Date
    Dec 2007
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Stripping tags from rssdisplaybox results?

    1) Script Title: Rssdisplaybox

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...ybox/index.htm

    3) Describe problem: Is there a way to strip unwanted tags from the results? I am using the results for a menu so these tags are making the menu search results inaccurate. You can see the page with the odd tags here: http://bluesplayer.co.uk/rssdisplayb...e-trailers.htm.

    Regards

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    This is something best done with PHP, by editing outputbody.php and using regular expressions to remove certain tags selectively. It does mean you need to be familiar with PHP obviously to make those kind of changes.
    DD Admin

  3. #3
    Join Date
    Dec 2007
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Well I found this code:

    Code:
    <?php
    $text = '<p>Test paragraph.</p><!-- Comment --> <a href="#fragment">Other text</a>';
    echo strip_tags($text);
    echo "\n";
    
    // Allow <p> and <a>
    echo strip_tags($text, '<p><a>');
    ?>
    but I am not sure how to apply it?

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
  •