Jump to content

irfandayan

Members
  • Posts

    1
  • Joined

  • Last visited

Everything posted by irfandayan

  1. I have mail function which gets mail message from a textarea. But whenever there is apostrophes and new line it show it like below. Example Output: Comments: You\\'re mailing address was wrong. Couldn\\'t you provide an other? Survey Answers: item : You\\'re making it well. Isn\\'t it?\nitem2 : It\\'d better to have a cup of tea?\n 1) There are three slashes added along with apostrophes. Is it likely something to do with magic escaping? is the stripslashes function the better option to remove it? 2) New line converted to \r\n. The issue is the \r\n might be a windows artifact. On a Linux server it might be \n only. Is it would be enough to use str_replace('\r\n', "\n", $message); ? Then str_replace("\n", "", $message); ?
×
×
  • Create New...