解决blogger文章内容中源代码不能真实显示的方法

blogger博客中文章内容如何显示源代码一直是困扰我的问题,主要是blogger解译功能很厉害,它会自动将文章中的源代码进行显示,我写技术性文章时需要将具体源代码显示出来,后来摸索到,通过html转义功能就能实现。所谓html转义请看: 这篇文章介绍 。 html转义在线工...

blogger博客中文章内容如何显示源代码一直是困扰我的问题,主要是blogger解译功能很厉害,它会自动将文章中的源代码进行显示,我写技术性文章时需要将具体源代码显示出来,后来摸索到,通过html转义功能就能实现。所谓html转义请看:这篇文章介绍

html转义在线工具有很多,大家一搜就找得到,比如:

  1. http://www.sojson.com/rehtml
  2. http://www.css88.com/tool/html-escape/

把需要转义的代码粘进去,再粘到blogger博文中就可以了,我在博文中一般用<pre>标签将转义后的代码包括起来,通过设置pre的css属性,让代码部分看起来更舒服。

COMMENTS

Loaded All Posts Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS PREMIUM CONTENT IS LOCKED STEP 1: Share to a social network STEP 2: Click the link on your social network Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy Table of Content