We seem to be doing the wrong sort of cleaning on post titles.
Or, are we treating the input as HTML for the benefit of multilang? Even so, surely we can make PARAM_TEXT more intelligent so that it copes with this.
I guess the final strip_tags in
case PARAM_TEXT: // leave only tags needed for multilang
is the problem.
Changing it to judicious use of htmlspecialchars would be better.