Problem when retrieving text in JSON format containing line breaks with jQuery

前端 未结 9 2172
独厮守ぢ
独厮守ぢ 2020-12-02 18:05

I\'m having a strange problem when retrieving JSON formatted text. I use jQuery post to send some data (also JSON formatted) to the server (running PHP) which w

9条回答
  •  再見小時候
    2020-12-02 18:47

    If the other responses didn't work, it's possible to strip all whitespace characters except the space.

    PHP $text = trim(preg_replace( "/[\\x00-\\x19]+/" , '' , $text));

    From: https://github.com/joomla/joomla-cms/issues/14502

提交回复
热议问题