
CONVERT CONTENT OF PRE-TAGS IN HTML-CODE
There have been dual opposite ways to arrangement a source formula instead of executing a source formula in a post or page. Depending on preferences that HTML tab is tangible in a character piece as well as supposing with formatting, formula fragments have been possibly spoken by <code> or <pre>. In a little cases, mixing a blogger even both tags.
Conversion of special characters
If you wish to make make use of of a pre Tag, afterwards you have to take caring that a formula snippets, whilst parsing, have been not executable. HTML-Entity is a solution.
Two options have been available: One, manually, such as poke as well as reinstate prior to pasting in to a editor (HTML-Entities-table). though if you have been intelligent you let WordPress you do a job.
Numerous methods for a elementary acclimatisation of a formula set in between pre-and/or formula tags have been on a web. But there is a single for a approach make make use of of in WordPress, that takes over to modify a characters ideally given WordPress 2.8.
//PHP-Code for functions.php function pre_esc_html($content) { return preg_replace_callback( '#(<pre.*?>)(.*?)(< /pre>)#imsu', create_function( '$i', 'return $i[1].esc_html($i[2]).$i[3];' ), $content ); } add_filter( 'the_content', 'pre_esc_html' );
Useful links
Guest Post
This post is combined by Sergej Müller wpseo.org, who combined a renouned WordPress Plugin to optimize your SEO.
Thank you really most from a partial to Sergej.
If you additionally similar to to have your engaging post published on a website, greatfully let us know on a hit page. Of march you will conclude your contribution!
Related posts:
- Joomla Fireboard to WordPress WP-FORUM Converter
- Joomla to WordPress – Content Converter!
- Image Metadata in WordPress
- How To Highlight A Slogan In WordPress
- Disable HTML Editor In WordPress
Thanks for subscribing a feed! Sponsor a WP Engineer Blog as well as get your code in front of multiform hundred users per day!
© WP Engineer Team, All rights indifferent (Digital Fingerprint: WPEngineer-be0254ce2b4972feb4b9cb72034a092d)
Go here to review a rest:
Convert Content of Pre-Tags in HTML-Code




.gif)
.gif)
