|
08-29-2005, 09:46 AM | #1 |
Green Mole
Join Date: Aug 2005
Posts: 5
|
possible to display snippets without losing line breaks?
I'm using phpdig to search some code. The search snippets lose all the line breaks
which are there on the original html version of the code. Can I display the snippets as they were originally? I think the original has the code I'm searching within a <PRE/> block. but just putting <pre></pre> around the output doesn't work. Any pointers welcome Rachel |
09-03-2005, 02:15 PM | #2 |
Head Mole
Join Date: May 2003
Posts: 2,539
|
The phpdigCleanHtmlfunction in robot_functions.php might be a good spot to edit to allow tags. By default PhpDig strips tags from indexed content to get just the text parts of the page. However, if you allow tags, you're going to run into problems like (a) when someone searches on pre and breaks a tag, (b) when the snippet cuts a tag in half and you see HTML source in the results, (c) when a begin/end tag is in the snippet but its match is not, etcetera. Instead you might consider using phpdigExclude/Include as described in this thread to avoid indexing code blocks.
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
php5 upgrade breaks phpdig | John Spikowski | Troubleshooting | 0 | 07-20-2007 02:21 PM |
Increase snippets lenght | quadisweb | Bug Tracker | 3 | 07-23-2005 12:37 PM |
How to display all results? | Edomondo | How-to Forum | 1 | 12-02-2004 07:03 PM |
Problems with snippets and 2 languages | herberth | How-to Forum | 2 | 04-26-2004 08:51 AM |
Security update breaks sites that call the search function from another directory | pittster | Troubleshooting | 3 | 01-19-2004 05:30 PM |