Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Archive

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Site search -> strip tags


Reply

2 Posts   1546 Views

Avatar
grilldan

30 August 2008 at 9:08pm (Last edited: 30 August 2008 9:30pm), Community Member, 135 Posts

I have a working version of

http://doc.silverstripe.com/doku.php?id=tutorial:4-site-search

What I want to do, is make it so that when it shows the results, it takes out any "<br />" tags in the html.

Do you have any ideas of how to do this?

I'm guessing it would be modifying this line:

'Results' => $form->getResults(),

but I'm not sure what to modify it to.

-----------

maybe using or reversing

Class SimpleTagBuilder

-----------

maybe with

http://doc.silverstripe.com/doku.php?id=escape-types

Avatar
grilldan

30 August 2008 at 10:03pm Community Member, 135 Posts

Easy fix with css...

.searchResults br {
   display: none;
}

Didn't think about that till I had already wasted an hour or two =)