Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#16 2008-12-31 15:02:30

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

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

#17 2008-12-31 15:35:58

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

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

#18 2008-12-31 16:05:26

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

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

#19 2008-12-31 19:05:10

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Search excerpt tag

Only the first part of #12

Offline

#20 2008-12-31 19:14:08

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Search excerpt tag

Yep. :)


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#21 2009-01-03 12:51:38

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

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

Board footer

Powered by FluxBB