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 数学建模招标中位数问题
  • ¥15 phython路径名过长报错 不知道什么问题
  • ¥15 深度学习中模型转换该怎么实现
  • ¥15 HLs设计手写数字识别程序编译通不过
  • ¥15 Stata外部命令安装问题求帮助!
  • ¥15 从键盘随机输入A-H中的一串字符串,用七段数码管方法进行绘制。提交代码及运行截图。
  • ¥15 TYPCE母转母,插入认方向
  • ¥15 如何用python向钉钉机器人发送可以放大的图片?