dousong2967 2013-10-24 19:52
浏览 60

Ckeditor在评论中没有在前端Opencart中显示html

Ckeditor in reviews not showing html in frontend Opencart !

I did it from /admin/view/template/catalog/review_form.tpl

IN

<td><textarea name="text" cols="60" rows="8"><?php echo $text; ?></textarea>

Added : id="description1"

<td><textarea name="text" cols="60" rows="8" id="description1"><?php echo $text; ?></textarea>

and before <?php echo $footer; ?>

I Added

<script type="text/javascript" src="view/javascript/ckeditor/ckeditor.js"></script>
<script type="text/javascript"><!--
CKEDITOR.replace('description1', {
 filebrowserBrowseUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>',
 filebrowserImageBrowseUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>',
 filebrowserFlashBrowseUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>',
 filebrowserUploadUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>',
 filebrowserImageUploadUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>',
 filebrowserFlashUploadUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>'
});
//--></script>

But the problem is in front end is showing the pure html code

insted of a link or image as google is showing <a href="http://www.google.com">google</a>

Any help?

Thanks

Edited on 25/10/13

I did it

<td><textarea name="text" cols="60" rows="8" id="description1"><?=htmlentities($text)?></textarea>

But without success

  • 写回答

1条回答 默认 最新

  • dtyqeoc70733 2013-10-24 20:01
    关注

    You should html-encode the text you want to put into the editor:

    <textarea name="text" cols="60" rows="8"><?=htmlentities($text)?></textarea>
    
    评论

报告相同问题?

悬赏问题

  • ¥15 乘性高斯噪声在深度学习网络中的应用
  • ¥15 运筹学排序问题中的在线排序
  • ¥15 关于docker部署flink集成hadoop的yarn,请教个问题 flink启动yarn-session.sh连不上hadoop,这个整了好几天一直不行,求帮忙看一下怎么解决
  • ¥30 求一段fortran代码用IVF编译运行的结果
  • ¥15 深度学习根据CNN网络模型,搭建BP模型并训练MNIST数据集
  • ¥15 C++ 头文件/宏冲突问题解决
  • ¥15 用comsol模拟大气湍流通过底部加热(温度不同)的腔体
  • ¥50 安卓adb backup备份子用户应用数据失败
  • ¥20 有人能用聚类分析帮我分析一下文本内容嘛
  • ¥30 python代码,帮调试,帮帮忙吧