2014-11-06 80 views
0

我正在使用带有summernote编辑器的codeigniter框架。Codeigniter summernote失败结果

如果我在PHP中使用后单页没有框架,结果却是这样的:

<span style="font-weight: bold;">asdasdasd</span> 

但如果我笨使用后的结果是不同的,就像这样:

<span bold;">asdasdasd</span> 

style='font-weight: ' is missing ..

为什么会发生这种情况,解决方案是什么?
谢谢你的帮助。

+0

可以显示的代码? – 2014-11-06 05:40:57

+0

代码就像在[summernote gist](https://gist.github.com/soomtong/6635053)中,但我在codeigniter页面中使用它。 – arhysaid 2014-11-06 05:45:07

回答

2

我得到了答案......

CI中不使用:

$_POST['content'] OR $_GET['content'] 

但使用:

$_REQUEST['content'] 

问题解决了!

0

我认为这是一个xss过滤器问题,尝试禁用或获取值为false。

$content = $this->input->post('content', FALSE); 

我已经与原来的summernote例如编辑:

<div class="span12"> 
     <h2>POST DATA</h2> 
     <pre> 
     <?php print_r($this->input->post(NULL, FALSE)); ?> 
     </pre> 
     <pre> 
     <?php echo htmlspecialchars($this->input->post('content', FALSE)); ?> 
     </pre> 
    </div>