Filtering TextOn the Frontier-newbies list, David Grenier, dgrenier@wheatonma.edu, says: "I'd like to build a filter that changes hard returns in my WP file to actual <BR> tags when the page is rendered."David's site I put together a site that shows how to do that. It's baked into this page. After loading the site into your database, open websites.davidSite.default. You'll see several state names, each on its own line. Now publish the page. It should look like this. Now open... websites.davidSite.["#filters"].pageFilter Here's what you'll see:
This is where the <BR> tags are added. Here's what string.replaceAll does.
Dave Winer |
|||||||||||||||||||||
|