Php 并不是所有的html标记都是通过Lravel中的ckeditor存储的
我正在我的laravel项目中使用ckeditor。我的问题是并不是所有的html标记都插入到我的数据库中 这是我在ckeditor中的源html示例:Php 并不是所有的html标记都是通过Lravel中的ckeditor存储的,php,laravel,ckeditor,Php,Laravel,Ckeditor,我正在我的laravel项目中使用ckeditor。我的问题是并不是所有的html标记都插入到我的数据库中 这是我在ckeditor中的源html示例: 此textarea值 当我单击提交时,只有这个textarea值插入到我的数据库中 打印时的输出(Input::all());: 将这一行放在customConfig.js中 config.allowedContent = true; 您可以阅读有关允许的内容规则的更多信息您可以共享编辑方法的代码吗?。我猜,就是它将返回的数据添加到数据库中。
此textarea值
当我单击提交时,只有这个textarea值插入到我的数据库中
打印时的输出(Input::all());:
将这一行放在customConfig.js中
config.allowedContent = true;
您可以阅读有关允许的内容规则的更多信息您可以共享编辑方法的代码吗?。我猜,就是它将返回的数据添加到数据库中。确保您使用PDO或尝试php$post->summary=mysql\u real\u escape\u字符串($post->summary)。cod看起来一切正常,也许您搞乱了其他事情?检查数据库中的Length/value
。
$post = $this->question->getById($id);
if ( ! $this->validator->validEdit(Input::all()))
{
return Redirect::back()->withInput()->withErrors($this->validator->errors());
}
$post = $this->question->edit($post, Input::all());
config.allowedContent = true;