HTML 显示 图片 加 HTML代码

試毅-思伟 杭州特扬网络科技有限公司 Java软件工程师  2017-02-16 03:02:19
如图

我想 显示 图片 然后 显示HTML代码 现在全都给我显示纯HTML代码了 。一点都没有头绪,
我后台进行了HTML编码。 不然的话显示到前台就会 变成这样

现在只能满足 一方 ,不能双方都满足 。 求大神支招

数据库 回复的内容:


我后台使用的是java
进行了编码 ,
求大神
...全文
344 点赞 收藏 9
写回复
9 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
試毅-思伟 2017-02-24
引用 8 楼 xiaozaq 的回复:
这个问题有点难,要截取字符串,我就先放着 关键是前台还有表情包 ,这个就有点尴尬了
回复
xiaozaq 2017-02-23
能吧下面几个地方代码贴一下吗?
1.模板页面那个地方是如何写的。
2.模板中使用的参数是什么,即java中对应的参数对象的值(主要是先看看传的值是否已经转义了)。
回复
試毅-思伟 2017-02-23
引用 5 楼 lshz008 的回复:
转义字符??你可以在后台替换下传回来啊或者直接存尖括号
如果里面包括图片呢????
回复
試毅-思伟 2017-02-23
引用 4 楼 xiaozaq 的回复:
页面使用模板技术还是ajax技术拼接的html页面?
模版技术 ftl
回复
jero丶泽 2017-02-16
转义字符??你可以在后台替换下传回来啊或者直接存尖括号
回复
xiaozaq 2017-02-16
页面使用模板技术还是ajax技术拼接的html页面?
回复
試毅-思伟 2017-02-16
<div class="comt"> <div class="ad_l"> <!-- 回复框文字 (D6) --> <div id="topic_buttom_left_ad"> <ins data-revive-zoneid="63" data-revive-id="8c38e720de1c90a6f6ff52f3f89c4d57" id="revive-0-9"></ins> </div> <ul class="tracking-ad" data-mod="popu_10"> <li><a href="http://bbs.csdn.net/topics/392066539" class="title_style_black" target="_blank">晒图谱,涨知识,得好礼</a></li> <li><a href="http://e.cn.miaozhen.com/r/k=6002065&p=4hU&ctid=1&rt=2&ns=__IP__&ni=__IESID__&v=__LOC__&vo=3b56fd611&vr=2&o=http%3A%2F%2Fwww.ibm.com%2Fdeveloperworks%2Fcn%2Fmobile%2Fzones%2Fswift%2Fq_a%2Findex.html%3Fcm_mmc%3Ddwchina-_-homepage-_-csdn-_-learn" class="title_style_red title_style_bold" target="_blank">Swift 问题与解答</a></li> <li><a href="http://bbs.csdn.net/topics/392057752" class="title_style_red title_style_bold" target="_blank">视频直播技术免费课</a></li> <li><a href="http://ask.csdn.net/subjects/26" class="title_style_red title_style_bold" target="_blank">专家问答-Android老司机帮你进阶</a></li> </ul> <div class="ad_new tracking-ad" style="padding: 0 0 50px 0" data-mod="popu_11"> <h4><img alt="" src="http://c.csdnimg.cn/www/images/csdn_logo_blue.gif"></h4> <p class="title"> </p> <p class="con"> </p> </div> </div> <div class="reply"> <form accept-charset="UTF-8" action="/posts?topic_id=392087275" class="new_post" id="new_post" method="post" novalidate="novalidate"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓"><input name="authenticity_token" type="hidden" value="22X9t0nqzPn2cPihkvPAwSKv2T59eW/d7MqxVj9iLsM="></div> <div> <strong>回复内容</strong>   <a href="http://www.csdn.net/app/" target="_blank" style="color: red">移动客户端回帖所得专家分翻倍,下载体验!</a> </div> <div class="editor"> <div><div id="markItUpPost_body" class="markItUp"><div class="tab"> <ul> <li class="hover"><a class="edit_btn_a" href="javascript:void(0);"><span>编辑</span></a></li> <li><a class="preview_btn_a" href="javascript:void(0);"><span>预览</span></a></li> </ul></div><div class="markItUpContainer"><div class="markItUpHeader"><ul><li class="markItUpButton markItUpButton1 bbtn_bold"><a href="" title="粗体">粗体</a></li><li class="markItUpButton markItUpButton2 bbtn_italic"><a href="" title="斜体">斜体</a></li><li class="markItUpButton markItUpButton3 bbtn_underline"><a href="" title="下划线">下划线</a></li><li class="markItUpSeparator">---------------</li><li class="markItUpButton markItUpButton4 bbtn_size not_prompt markItUpDropMenu"><a href="" title="字体大小">字体大小</a><ul><li class="markItUpButton markItUpButton4-1 col1-1"><a href="" title="12px">12px</a></li><li class="markItUpButton markItUpButton4-2 col1-2"><a href="" title="13px">13px</a></li><li class="markItUpButton markItUpButton4-3 col1-3"><a href="" title="14px">14px</a></li><li class="markItUpButton markItUpButton4-4 col2-1"><a href="" title="16px">16px</a></li><li class="markItUpButton markItUpButton4-5 col2-2"><a href="" title="18px">18px</a></li><li class="markItUpButton markItUpButton4-6 col2-3"><a href="" title="24px">24px</a></li></ul></li><li class="markItUpButton markItUpButton5 bbtn_color not_prompt markItUpDropMenu"><a href="" title="字体颜色">字体颜色</a><ul><li class="markItUpButton markItUpButton5-1 col1-1"><a href="" title="黑色">黑色</a></li><li class="markItUpButton markItUpButton5-2 col1-2"><a href="" title="褐色">褐色</a></li><li class="markItUpButton markItUpButton5-3 col1-3"><a href="" title="橄榄色">橄榄色</a></li><li class="markItUpButton markItUpButton5-4 col1-4"><a href="" title="深绿">深绿</a></li><li class="markItUpButton markItUpButton5-5 col1-5"><a href="" title="深青">深青</a></li><li class="markItUpButton markItUpButton5-6 col1-6"><a href="" title="深蓝">深蓝</a></li><li class="markItUpButton markItUpButton5-7 col1-7"><a href="" title="靛蓝">靛蓝</a></li><li class="markItUpButton markItUpButton5-8 col1-8"><a href="" title="灰色-80%">灰色-80%</a></li><li class="markItUpButton markItUpButton5-9 col2-1"><a href="" title="深红">深红</a></li><li class="markItUpButton markItUpButton5-10 col2-2"><a href="" title="橙色">橙色</a></li><li class="markItUpButton markItUpButton5-11 col2-3"><a href="" title="深黄">深黄</a></li><li class="markItUpButton markItUpButton5-12 col2-4"><a href="" title="绿色">绿色</a></li><li class="markItUpButton markItUpButton5-13 col2-5"><a href="" title="绿色">绿色</a></li><li class="markItUpButton markItUpButton5-14 col2-6"><a href="" title="蓝色">蓝色</a></li><li class="markItUpButton markItUpButton5-15 col2-7"><a href="" title="蓝-灰">蓝-灰</a></li><li class="markItUpButton markItUpButton5-16 col2-8"><a href="" title="灰色-50%">灰色-50%</a></li><li class="markItUpButton markItUpButton5-17 col3-1"><a href="" title="红色">红色</a></li><li class="markItUpButton markItUpButton5-18 col3-2"><a href="" title="浅橙">浅橙</a></li><li class="markItUpButton markItUpButton5-19 col3-3"><a href="" title="酸橙">酸橙</a></li><li class="markItUpButton markItUpButton5-20 col3-4"><a href="" title="海绿">海绿</a></li><li class="markItUpButton markItUpButton5-21 col3-5"><a href="" title="水绿色">水绿色</a></li><li class="markItUpButton markItUpButton5-22 col3-6"><a href="" title="浅蓝">浅蓝</a></li><li class="markItUpButton markItUpButton5-23 col3-7"><a href="" title="紫罗兰">紫罗兰</a></li><li class="markItUpButton markItUpButton5-24 col3-8"><a href="" title="灰色-40%">灰色-40%</a></li><li class="markItUpButton markItUpButton5-25 col4-1"><a href="" title="粉红">粉红</a></li><li class="markItUpButton markItUpButton5-26 col4-2"><a href="" title="金色">金色</a></li><li class="markItUpButton markItUpButton5-27 col4-3"><a href="" title="黄色">黄色</a></li><li class="markItUpButton markItUpButton5-28 col4-4"><a href="" title="鲜绿">鲜绿</a></li><li class="markItUpButton markItUpButton5-29 col4-5"><a href="" title="青绿">青绿</a></li><li class="markItUpButton markItUpButton5-30 col4-6"><a href="" title="天蓝">天蓝</a></li><li class="markItUpButton markItUpButton5-31 col4-7"><a href="" title="梅红">梅红</a></li><li class="markItUpButton markItUpButton5-32 col4-8"><a href="" title="灰色-25%">灰色-25%</a></li><li class="markItUpButton markItUpButton5-33 col5-1"><a href="" title="玖瑰红">玖瑰红</a></li><li class="markItUpButton markItUpButton5-34 col5-2"><a href="" title="茶色">茶色</a></li><li class="markItUpButton markItUpButton5-35 col5-3"><a href="" title="浅黄">浅黄</a></li><li class="markItUpButton markItUpButton5-36 col5-4"><a href="" title="浅绿">浅绿</a></li><li class="markItUpButton markItUpButton5-37 col5-5"><a href="" title="浅青绿">浅青绿</a></li><li class="markItUpButton markItUpButton5-38 col5-6"><a href="" title="淡蓝">淡蓝</a></li><li class="markItUpButton markItUpButton5-39 col5-7"><a href="" title="淡紫">淡紫</a></li><li class="markItUpButton markItUpButton5-40 col5-8"><a href="" title="白色">白色</a></li></ul></li><li class="markItUpSeparator">---------------</li><li class="markItUpButton markItUpButton6 pictu
回复
試毅-思伟 2017-02-16
<div class="comt"> <div class="ad_l"> <!-- 回复框文字 (D6) --> <div id="topic_buttom_left_ad"> <ins data-revive-zoneid="63" data-revive-id="8c38e720de1c90a6f6ff52f3f89c4d57" id="revive-0-9"></ins> </div> <ul class="tracking-ad" data-mod="popu_10"> <li><a href="http://bbs.csdn.net/topics/392066539" class="title_style_black" target="_blank">晒图谱,涨知识,得好礼</a></li> <li><a href="http://e.cn.miaozhen.com/r/k=6002065&p=4hU&ctid=1&rt=2&ns=__IP__&ni=__IESID__&v=__LOC__&vo=3b56fd611&vr=2&o=http%3A%2F%2Fwww.ibm.com%2Fdeveloperworks%2Fcn%2Fmobile%2Fzones%2Fswift%2Fq_a%2Findex.html%3Fcm_mmc%3Ddwchina-_-homepage-_-csdn-_-learn" class="title_style_red title_style_bold" target="_blank">Swift 问题与解答</a></li> <li><a href="http://bbs.csdn.net/topics/392057752" class="title_style_red title_style_bold" target="_blank">视频直播技术免费课</a></li> <li><a href="http://ask.csdn.net/subjects/26" class="title_style_red title_style_bold" target="_blank">专家问答-Android老司机帮你进阶</a></li> </ul> <div class="ad_new tracking-ad" style="padding: 0 0 50px 0" data-mod="popu_11"> <h4><img alt="" src="http://c.csdnimg.cn/www/images/csdn_logo_blue.gif"></h4> <p class="title"> </p> <p class="con"> </p> </div> </div> <div class="reply"> <form accept-charset="UTF-8" action="/posts?topic_id=392087275" class="new_post" id="new_post" method="post" novalidate="novalidate"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓"><input name="authenticity_token" type="hidden" value="22X9t0nqzPn2cPihkvPAwSKv2T59eW/d7MqxVj9iLsM="></div> <div> <strong>回复内容</strong>   <a href="http://www.csdn.net/app/" target="_blank" style="color: red">移动客户端回帖所得专家分翻倍,下载体验!</a> </div> <div class="editor"> <div><div id="markItUpPost_body" class="markItUp"><div class="tab"> <ul> <li class="hover"><a class="edit_btn_a" href="javascript:void(0);"><span>编辑</span></a></li> <li><a class="preview_btn_a" href="javascript:void(0);"><span>预览</span></a></li> </ul></div><div class="markItUpContainer"><div class="markItUpHeader"><ul><li class="markItUpButton markItUpButton1 bbtn_bold"><a href="" title="粗体">粗体</a></li><li class="markItUpButton markItUpButton2 bbtn_italic"><a href="" title="斜体">斜体</a></li><li class="markItUpButton markItUpButton3 bbtn_underline"><a href="" title="下划线">下划线</a></li><li class="markItUpSeparator">---------------</li><li class="markItUpButton markItUpButton4 bbtn_size not_prompt markItUpDropMenu"><a href="" title="字体大小">字体大小</a><ul><li class="markItUpButton markItUpButton4-1 col1-1"><a href="" title="12px">12px</a></li><li class="markItUpButton markItUpButton4-2 col1-2"><a href="" title="13px">13px</a></li><li class="markItUpButton markItUpButton4-3 col1-3"><a href="" title="14px">14px</a></li><li class="markItUpButton markItUpButton4-4 col2-1"><a href="" title="16px">16px</a></li><li class="markItUpButton markItUpButton4-5 col2-2"><a href="" title="18px">18px</a></li><li class="markItUpButton markItUpButton4-6 col2-3"><a href="" title="24px">24px</a></li></ul></li><li class="markItUpButton markItUpButton5 bbtn_color not_prompt markItUpDropMenu"><a href="" title="字体颜色">字体颜色</a><ul><li class="markItUpButton markItUpButton5-1 col1-1"><a href="" title="黑色">黑色</a></li><li class="markItUpButton markItUpButton5-2 col1-2"><a href="" title="褐色">褐色</a></li><li class="markItUpButton markItUpButton5-3 col1-3"><a href="" title="橄榄色">橄榄色</a></li><li class="markItUpButton markItUpButton5-4 col1-4"><a href="" title="深绿">深绿</a></li><li class="markItUpButton markItUpButton5-5 col1-5"><a href="" title="深青">深青</a></li><li class="markItUpButton markItUpButton5-6 col1-6"><a href="" title="深蓝">深蓝</a></li><li class="markItUpButton markItUpButton5-7 col1-7"><a href="" title="靛蓝">靛蓝</a></li><li class="markItUpButton markItUpButton5-8 col1-8"><a href="" title="灰色-80%">灰色-80%</a></li><li class="markItUpButton markItUpButton5-9 col2-1"><a href="" title="深红">深红</a></li><li class="markItUpButton markItUpButton5-10 col2-2"><a href="" title="橙色">橙色</a></li><li class="markItUpButton markItUpButton5-11 col2-3"><a href="" title="深黄">深黄</a></li><li class="markItUpButton markItUpButton5-12 col2-4"><a href="" title="绿色">绿色</a></li><li class="markItUpButton markItUpButton5-13 col2-5"><a href="" title="绿色">绿色</a></li><li class="markItUpButton markItUpButton5-14 col2-6"><a href="" title="蓝色">蓝色</a></li><li class="markItUpButton markItUpButton5-15 col2-7"><a href="" title="蓝-灰">蓝-灰</a></li><li class="markItUpButton markItUpButton5-16 col2-8"><a href="" title="灰色-50%">灰色-50%</a></li><li class="markItUpButton markItUpButton5-17 col3-1"><a href="" title="红色">红色</a></li><li class="markItUpButton markItUpButton5-18 col3-2"><a href="" title="浅橙">浅橙</a></li><li class="markItUpButton markItUpButton5-19 col3-3"><a href="" title="酸橙">酸橙</a></li><li class="markItUpButton markItUpButton5-20 col3-4"><a href="" title="海绿">海绿</a></li><li class="markItUpButton markItUpButton5-21 col3-5"><a href="" title="水绿色">水绿色</a></li><li class="markItUpButton markItUpButton5-22 col3-6"><a href="" title="浅蓝">浅蓝</a></li><li class="markItUpButton markItUpButton5-23 col3-7"><a href="" title="紫罗兰">紫罗兰</a></li><li class="markItUpButton markItUpButton5-24 col3-8"><a href="" title="灰色-40%">灰色-40%</a></li><li class="markItUpButton markItUpButton5-25 col4-1"><a href="" title="粉红">粉红</a></li><li class="markItUpButton markItUpButton5-26 col4-2"><a href="" title="金色">金色</a></li><li class="markItUpButton markItUpButton5-27 col4-3"><a href="" title="黄色">黄色</a></li><li class="markItUpButton markItUpButton5-28 col4-4"><a href="" title="鲜绿">鲜绿</a></li><li class="markItUpButton markItUpButton5-29 col4-5"><a href="" title="青绿">青绿</a></li><li class="markItUpButton markItUpButton5-30 col4-6"><a href="" title="天蓝">天蓝</a></li><li class="markItUpButton markItUpButton5-31 col4-7"><a href="" title="梅红">梅红</a></li><li class="markItUpButton markItUpButton5-32 col4-8"><a href="" title="灰色-25%">灰色-25%</a></li><li class="markItUpButton markItUpButton5-33 col5-1"><a href="" title="玖瑰红">玖瑰红</a></li><li class="markItUpButton markItUpButton5-34 col5-2"><a href="" title="茶色">茶色</a></li><li class="markItUpButton markItUpButton5-35 col5-3"><a href="" title="浅黄">浅黄</a></li><li class="markItUpButton markItUpButton5-36 col5-4"><a href="" title="浅绿">浅绿</a></li><li class="markItUpButton markItUpButton5-37 col5-5"><a href="" title="浅青绿">浅青绿</a></li><li class="markItUpButton markItUpButton5-38 col5-6"><a href="" title="淡蓝">淡蓝</a></li><li class="markItUpButton markItUpButton5-39 col5-7"><a href="" title="淡紫">淡紫</a></li><li class="markItUpButton markItUpButton5-40 col5-8"><a href="" title="白色">白色</a></li></ul></li><li class="markItUpSeparator">---------------</li><li class="markItUpButton markItUpButton6 pictu
回复
試毅-思伟 2017-02-16
好难 ,这个
回复
相关推荐
发帖
Web 开发
创建于2007-09-28

8.0w+

社区成员

Java Web 开发
申请成为版主
帖子事件
创建了帖子
2017-02-16 03:02
社区公告
暂无公告