=== Escape HTML === Contributors: satya61229 Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=JCVH4RPHL4P5G Tags: code, script, escape, encode, entity, entities, html, developer, programmer, post Requires at least: 2.0.2 Tested up to: 3.1 Stable tag: 1.1 Helpful plugin for those who post code (PHP, JavaScript, HTML, CSS, any) online. == Description == Many of us post code and scripts online on our blog and for that we need to escape those codes to html entities. If, we are going to show `text` to visitors we need to enter `<b>text</b>` in our Wordpress HTML editor. We also want to use syntax Highlighter for decorating our code. Server side highlighter plugins are doing html tags conversion to html entities but those who are using Client-side (JavaScript) syntax Highlighter need to convert characters manually or using any [tool](http://www.satya-weblog.com/tools/htmlencode.php). If you are using [Google Syntax Highlighter for WordPress](http://wordpress.org/extend/plugins/google-syntax-highlighter/) which is a client-side Syntax-Highlighter. So, you may be taking care of `<, > and &` before posting any code online. This plugin will avoid that extra work. This code only come into effect when we save a post and it only affect those text written inside <pre>, <code> and <tt> tag. Text placed inside `'pre', 'code', 'kbd', 'style', 'script', and 'tt'` is not touched by Wordpress for transformation. I have checked this in version 2.8 and newer. So, we can utilize these tags for our code posting. <pre>, and <code> have their own advantages for SEO. It is also helpful at those places where Javascript is disabled. Most feed readers do not support JavaScript. So, many blog owners are using client-side syntax highlighter based on JavaScript. For more information about this plugin and wordpress setting related to this plugin, please [check here](http://www.satya-weblog.com/). Another WP plugin from [Satya](http://www.satya-weblog.com/) - [Performance Optimization: Order Styles and Javascript](http://wordpress.org/extend/plugins/performance-optimization-order-styles-and-javascript/). == Installation == 1. Download the plugin from Wordpress Plugin Directory. 2. Upload `escapehtml.php` to the `/wp-content/plugins/` directory 3. Active the plugin 4. Now, for new posts, code can be posted without escaping HTML. == Frequently Asked Questions == = Who should use this plugin ? = I have written this plugin for escaping characters `(<, > and &)` to html entities. This is required for posting any code online. I usually post code from HTML editors as Visual editor tend to format according to it is own way which is generally not good for code. == Changelog == = 1.0 = * Added support for <code> and <tt> tags. * 'code' and 'tt' can be used for inline code posting, whereas 'pre' can be used for block code posting. * Text inside 'pre', 'code', 'kbd', 'style', 'script', 'tt' is not touched by Wordpress for transformation. I have checked this in version 2.8 and newer. = 0.5 = * Development release == Upgrade Notice == = 1.0 = Added support for <code> and <tt> tags. 'code' and 'tt' can be used for inline code posting, whereas 'pre' can be used for block code posting.