Fixed an error in converting the preg_replace to make the links