[pmwiki-users] back to teasers :)
Patrick R. Michaud
pmichaud at pobox.com
Fri Apr 15 10:50:48 CDT 2005
On Fri, Apr 15, 2005 at 09:59:13AM -0400, Radu wrote:
> At 09:27 AM 4/15/2005, Patrick R. Michaud wrote:
> > However,
> >perhaps we could store a stripped version of the page at the time the
> >page is saved. That might be *really* useful for this as well as
> >RSS feeds -- I'll probably play with that soon.
> Cool. So no need for me to get cooking? I see it as part of the
> pagelist+friends makeover, which is why I suggested it now.
Well, it might not be so simple or quick as I first thought. One
problem may be that a page could be using conditional markup to
hide protected content that could then leak out via the teaser.
A greatly simplified example:
(:if auth edit:)
Stuff I don't want non-editors to see!
If this is converted to text at the time the page is saved, then the
text would be included in the stripped text and could "leak" out
in the teasers.
But perhaps the answer here is to simply draw a line in the sand
and say that PmWiki provides read-security only for whole pages;
i.e., it doesn't worry about hiding only parts of pages for
And for those who might be worried about read-protected pages
being leaked via (:include:) -- includes wouldn't be processed in
the stripped text, and (:include:) already checks page permissions
before doing its thing.
> >Also, I should note that for search results many people would prefer
> >to see the text surrounding the search terms instead of the first
> >part of the page, so we should allow for that too.
> That's another good point. One on which pagelist would differ from
> *friends* :)
Um, no, what gets output by a search or pagelist is primarily controlled
by the fmt= parameter, not by the name of the directive itself.
Thus we'd have two different available fmt='s (one for leading teaser
text, one for search term excertps), or a single fmt= that was smart
enough to tell the appropriate one to use.
More information about the pmwiki-users