@merlin214365: As a golden rule, most functions will return a string by putting
get_ in front of the function name, rather than echoing (which is just an alias for the get_ anyway). Most functions you’re likely to need are in
functions.bb-template.php too, so have a read through that and I’d recommend getting an editor like Programmer’s Notepad to be able to search through bbPress’ code all at once to understand usage.
strip_tags will take out all HTML and PHP tags, so no need for an extra str_replace