[pmwiki-users] HTML entities

Stirling Westrup sti at pooq.com
Wed Oct 11 19:12:17 CDT 2006


Hannes Korte wrote:

> That looks interesting as well, I'll have a look at it. But isn't there
> a way to add a custom function to the functions that process the content
> whenever action=browse is requested?

Certainly, and it wouldn't be very difficult to write, but it would mean
the replacement work would be happening as the page was being displayed,
not just once as it was saved. If you want to go that route though, you
should be warned that PHP is not very unicode-friendly. Still, replacing
single characters with their HTML equivalents shouldn't be hard to code.
Check out the documentation on Custom Markups:

  http://www.pmwiki.org/wiki/PmWiki/CustomMarkup

You'll want to define the pattern as being any one of the characters you
want to convert, and the replacement would be an expression that just
looked up the conversion in an array, and used the canned replacement
text it found there.





More information about the pmwiki-users mailing list