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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Archive /

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

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

Site search -> strip tags


Go to End


2 Posts   1919 Views

Avatar
grilldan

Community Member, 135 Posts

30 August 2008 at 9:08pm

Edited: 30/08/2008 9:30pm

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

Community Member, 135 Posts

30 August 2008 at 10:03pm

Easy fix with css...

.searchResults br {
display: none;
}

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