RC1.03 now available, as planned

5 views
Skip to first unread message

Henrik Bechmann

unread,
Jun 18, 2011, 6:20:20 PM6/18/11
to simpl...@googlegroups.com
All,

I've implemented the changes I indicated earlier, and made them available in simplewiki rc1.03

Notably, you can now register both a rawlink handler and a character filter handler.

For the rawlink handler, look for $node->linkparts->rawlink, and set $node->linkparts->rawlinkaddress in the returned $node.

The charfilter handler is expected to filter the first $text argument, and return it. A $node is passed as a second argument for context assessment.

If you want to display the contents of a node or debugging, use var_dump($node->get_display_list()), which avoids the parent and children properties, thus avoiding recursion.

Also note that this version allows an image version identifier (eg. {{Images:Someimage.png`thumbnail}}) to allow handlers to generate versions on demand.

This product is now in feature freeze, and I expect to promote it to version 1 within a month or so.

- Henrik

Michael Clerx

unread,
Jun 19, 2011, 6:36:59 AM6/19/11
to simplewiki
Hi! Nice work :)

I caught a typo on line 576

protected function char_filter($text, $node = NULL)
{
if (isset($this->_charfilter_handler)) {
return call_user_func($this->_rawlink_handler,$text,$node);
} else {
return htmlspecialchars($text);
}
}

I changed this to

protected function char_filter($text, $node = NULL)
{
if (isset($this->_charfilter_handler)) {
return call_user_func($this->_charfilter_handler,$text,$node);
} else {
return htmlspecialchars($text);
}
}

and now it's working beautifully

thanks!



On Jun 19, 12:20 am, Henrik Bechmann <hbechm...@gmail.com> wrote:
> All,
>
> I've implemented the changes I indicated earlier, and made them available in
> simplewiki rc1.03 <http://simplewiki.org/download>.

Henrik Bechmann

unread,
Jun 19, 2011, 10:50:18 AM6/19/11
to simpl...@googlegroups.com
Michael,

Oops. Thanks!

I've updated the rc1.03 download to reflect this correction.

Out of interest, what alternate character filtering do you use?

Thanks again!

Best,

- Henrik


--
You received this message because you are subscribed to the Google Groups "simplewiki" group.
To post to this group, send email to simpl...@googlegroups.com.
To unsubscribe from this group, send email to simplewiki+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/simplewiki?hl=en.




--
bechmann.ca

Michael Clerx

unread,
Jun 19, 2011, 2:23:57 PM6/19/11
to simplewiki
I've been using
htmlentities($text, ENT_QUOTES, 'UTF-8')
for a few years now with good results.
In theory, this shouldn't be required, but it saves a lot of hassle to
be on the safe side and replace all special characters by their html
counterparts.

thanks for the quick updates!


On Jun 19, 4:50 pm, Henrik Bechmann <hen...@bechmann.ca> wrote:
> Michael,
>
> Oops. Thanks!
>
> I've updated the rc1.03 download to reflect this correction.
>
> Out of interest, what alternate character filtering do you use?
>
> Thanks again!
>
> Best,
>
> - Henrik
>

Henrik Bechmann

unread,
Jun 19, 2011, 3:07:17 PM6/19/11
to simpl...@googlegroups.com
Interesting...
Reply all
Reply to author
Forward
0 new messages