用谷歌API显示地图,然后有一些HTML方向字符串,包含了HTML标签。
现在我想在普通文本中显示这些字符,不知道应该怎么实现?字符串如下:
Head <b>southwest</b> toward <b>GH Rd</b>
Exit the roundabout onto <b>GH Rd</b><div style="font-size:0.9em">Go through 1 roundabout</div>
At the roundabout, take the <b>1st</b> exit onto <b>Road Number 2</b><div style="font-size:0.9em">Pass by myonlinesearch.blogspot.com (on the left in 600 m)</div>
At the roundabout, take the <b>3rd</b> exit onto <b>CH Rd</b>
At <b>Indroda Cir</b>, take the <b>2nd</b> exit onto <b>Gandhinagar Ahmedabad Rd/SH 71</b><div style="font-size:0.9em">Continue to follow Gandhinagar Ahmedabad Rd</div><div style="font-size:0.9em">Go through 1 roundabout</div>
At the roundabout, take the <b>1st</b> exit onto <b>Sardar Patel Ring Rd</b>
At <b>Ranasan Cir</b>, take the <b>3rd</b> exit onto <b>NH 8</b><div style="font-size:0.9em">Pass by Galaxy Restaurant (on the left in 4.3 km)</div>
Turn <b>left</b> onto <b>Galaxy Rd</b><div style="font-size:0.9em">Pass by Shiv Shakti Food Fort (on the left)</div>
Turn <b>left</b> onto <b>NH 59</b>
Turn <b>right</b><div style="font-size:0.9em">Go through 1 roundabout</div>
Turn <b>right</b>
Turn <b>left</b><div style="font-size:0.9em">Destination will be on the right</div>
org.apache.commons.lang.StringEscapeUtils
类可以对js sql html xml等代码进行转义!用来处理前端js注入代码
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。