writing tiki plugins, why is it messing with (formatting) the output
I've been working on some custom Tiki Plugins for my site lately and have run into a delimma. I decided to put the contents of the page into a plugin like:
{MYPLUGIN()}
the page text: line 1
the page text: line 2
{MYPLUGIN}
The first problem I run into is that TikiWiki no longer converts the newlines in the text body into the proper line breaks. I decided to fix this problem by using PHP's preg_replace on the page data before it is returned by the plugin.
The line breaks were added in, but after this all of my spaces were converted to . This makes the lines go off of the edge of the page.
Here is an example of what I am talking about:
http://www.paranormalwiki.com/tiki-index.php?page=The+Five+Absolute+Worst+Foods+You+Can+Eat
It appears to be taking the data returned by the plugin and, for whatever reason, changing the spaces to non-breaking spaces. Anyone know a workaround to this?
thx.