Articles of pre

replace html entities in posts between pre tags

I run a wordpress blog with a syntax highlighter plugin (Crayon). The plugin highlights code between pre tags, example: <pre class=”lang:languageid” title=”example”> some code </pre> WordPress sometimes replaces characters suchs as ” & < > with html entities which are shown in the code &quot; &amp; etc. I tried several plugins that should prevent this […]

Including Angle Brackets In Pre Sections

I am attempting to post some java code between pre tags but the angel brackets get removed. For example: private HashMap<String, HashMap<String, Integer>> featureCounts; becomes private HashMap> featureCounts; Is there a way I can render the actual code? Also I am not a php developer or a wordpress expert by any means, so modifying the […]

Formatting with <pre>

I’m building a site that doesn’t want any styling applied to the entry-content, because it should keep the formatting of the text. Bizarly, it works on old entries, but new entries via the front-end system fail: http://madebylars.nl/music/?page_id=373 Example: This one works: http://madebylars.nl/music/?tab=the-tallest-man-on-earth-love-is-all This one doesn’t: http://madebylars.nl/music/?tab=the-tallest-man-on-earth-like-the-wheel They both look fine in the WordPress back-end, but […]

Keep pasted pre formatted code as it is -with tabs- in visual editor

I need a manual code to my functions php to extend the visual editor from removing tabs when pasting code blocks. I tried this code, found at this site, but it does not work as I want. If I got: add_filter(‘tiny_mce_before_init’, ‘tiny_mce_before_init’); function tiny_mce_before_init($init) { $init[‘setup’] = “function(ed) { ed.onBeforeSetContent.add(function(ed, o) { if ( o.content.indexOf(‘<pre’) […]

WordPress automatically adds <pre> tags when pasting code, how to stop it?

I am presently learning PHP and Linux simultaneously. And I want to blog my notes not only for my future reference, but also because it could help others. I just noticed an issue with WordPress – – it automatically adds <pre></pre> tags in the background (HTML-side I mean, in the visual editor I see the […]