XF 1.5 Manipulate Post Content


I want to manipulate the post content of all posts that are displayed and wonder how I could do this. I am generally familiar with how to make an add-on, but I am not sure which class and method to extend.

Say, I want to replace any "Hello" with "H3ll0", but not in the database but only for the output. (And no, I do not want to use censorship for that because what I actually want to do is different ;) )

So in fact what I'd like to do is something like that:

$content = preg_replace('~hello~uim', 'H3ll0', $content);
return $content;
Also, since future arrives quicker than you might think, how would that look in XF2?

Thank you!