I believe it replaces other characters like > or < with their html equivalents. It also correctly replaces the return ascii character to \n but for some reason that only shows up in the source code but not in the actual page which is why I replaced \n with <br/>