Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: Search excerpt tag
On that site I’m going to open up the “About” section of the theme for searching as I’m sure it contains articles that have non-textiled entities in them and see what I get.
Hang on. What happens if an article contains something like <div> on it’s own line but has a blank space in front of it so that it isn’t textiled? How does that get saved?
Anyway, doing a search for “div” gives two results.
The first is what I think would be termed a “partial” match which is fine.
The second only displays the article title, no excerpt(s). This particular article does not contain the word “div” but it does contain a lot of <div> tags.
Last edited by thebombsite (2008-12-31 16:03:32)
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
Re: Search excerpt tag
Tags are stripped from excerpts, so they never show up. Searching for part of a HTML entity is the only thing that really causes problems.
The patch shown above is far too invasive for 4.0.8. I might go for a small patch like the one in post #12. Not perfect, but enough to avoid the most common problems.
Offline
Re: Search excerpt tag
OK. I’m still using the code from #10 so I’ll swap to #12 and let you know if anything odd occurs.
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
Re: Search excerpt tag
Only the first part of #12
Offline
Re: Search excerpt tag
Yep. :)
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
Re: Search excerpt tag
I should just mention that I’ve included the new code in thebombsite.com and I’m not seeing any problems with it yet. Doing a search for “txp” throws out a lot more results and everything seems to validate. I’ll let you know if I catch anything.
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline