fix bug 836327 - use preg_replace_callback