WordPress Plugin: Code Autoescape
If you frequently post code snippets into your WordPress blog then you already know how tedious and very error prone the process is. You will need to manually escape every single <, > and & characters in your code by hand. If not, either the code won’t get displayed properly or part of it will ferociously get eaten by WordPress. Needless to say, this is a process we’d very much like to avoid.
There are several plugins that do this already. However, in my opinion they are all not perfect. So, this is my attempt at another not so perfect code snippet plugin :).
Problems When Posting Code Snippets
- <, >, and & need to be escaped manually.
- WordPress tag balancing. A problem when posting incomplete HTML/XML code snippets.
- convert_chars. This will happily eat
<title>...</title>
tags, among other things. - Inconsistent escaping. Sometimes, WordPress will escape &, and in other cases would not.
- Smilies. We like having smilies when expressing our thoughts, but certainly not within code snippets!
- wptexturize. It creates code blocks that looks right on our eyes, but won’t work when copied and pasted.
- make_clickable in comments. This could wreak havoc on code snippets within comments.
- wpautop in comments. I can’t tell what this does, but it looks nasty to me.
Problems With Other Plugins
- Attempt to reverse wptexturize and/or convert_chars. This makes it impossible to introduce literal ellipsis in code blocks for example. I don’t know if this could become a problem, but it certainly can happen. Furthermore, if core WordPress updates wptexturize, then the plugin will need to be updated too.
Design Decision For This Plugin
The plugin is designed to get around the problems listed above. However the plugin does not do syntax coloring, line numbering, parsed HTML within code blocks, or anything fancy. But you should be able to write anything within codeblocks and it should appear correctly. The only exception is you can’t write a literal “<code>” and “</code>” inside codeblocks.
Code blocks in comments will be converted into pre code blocks if it contains multiple lines. I don’t know if this may create problem with XHTML validity.
Installation
Download the plugin: codeautoescape.txt.
Rename the file into
codeautoescape.php
and put it in yourwp-content/plugins
directory.Activate the plugin from WordPress administration page.
Usage
Post your code snippets enclosed by <code>…</code>. If it is multi line, you should use <pre><code>…</code></pre>.
In comments, enclose the code within <code>…</code>. If it is multi line, the plugins will add <pre>…</pre> automatically.
Stress Tests (or proof that this works)
Unbalanced HTML, title tag:
<html>
<head>
<title>Lorem ipsum dolor sit amet</title>
</head>
<body>
...
Previously, this will turn into emoticons:
:) :( :D :-?
Perl script:
#!/usr/bin/perl
use strict;
our $i = 0;
while (<>) {
$i++;
print "line $i: $_";
}
PHP script and HTML in code:
<?php
echo "<p>this is a paragraph</p>"
?>
XML data:
<?xml version="1.0" encoding="UTF-8"?>
<Recipe name="bread" prep_time="5 mins" cook_time="3 hours">
<title>Basic bread</title>
<ingredient amount="3" unit="cups">Flour</ingredient>
<ingredient amount="0.25" unit="ounce">Yeast</ingredient>
<ingredient amount="1.5" unit="cups">Warm Water</ingredient>
<ingredient amount="1" unit="teaspoon">Salt</ingredient>
<Instructions>
<step>Mix all ingredients together, and knead thoroughly.</step>
<step>Cover with a cloth, and leave for one hour in warm room.</step>
<step>Knead again, place in a tin, and then bake in the oven.</step>
</Instructions>
</Recipe>
Regular quotes should not be converted into “fancy” ‘quotes’.
foo("bar", 'baz');
Similar Plugins
Changelog
2005-09-27, v1.0:
- Initial release
2005-09-28, v1.1:
- Fixes invalid XHTML in comments
2005-09-29, v2.0:
- Code refactoring
sepertinya Priyadi “nyepet” comments/postingan gw nih :)>-
hehe.. thanks for the info Om Pri :x
Nice work! :)
Now, to test the only thing that my plugin really does over “Preserve code formatting”, the plugin on which mine is based. Allowing illegal HTML tags within code tags in comments:
<table border="1"><tr><td>This</td><td>is</td><td>in</td><td>a</td><td>table</td></tr></table>
Okay, I’m officially killing “my” plugin, pointing people here, and using your’s from now on. It’s WAY better. :D
wah … ada plugin baru yach ??
pasang …
:-“
:-? nice..
asyik
ever heard of geshi plugin? It will even colorize your code :D ..
See some sample here ;)
Mungkin maksudnya
#10: i don’t like colorization because the plugins that do it generate non-semantic HTML code :) i might add semantic colorization to this plugin sometime.
in addition, it looks like the geshi plugins also suffers from most of the problems listed above. never tried that personally, though.
#10: fixed!
kaka pri unstoppable nih yeee :d
This presents problems when in
code
tags:Yes, I know it should be in pre tags, but it’s still a bug. :)
Example: http://www.viper007bond.com/wordpress-plugins/short-urls/
Note that that post is still using
<
and stuff instead of<
.hehe.. pri rajin&kreatip ya… :)
*pasang aaah..*
saya lebih suka pakai codeviewer yang di beri efek js jadinya seluruh kode dis embunyikan hanya sebuah baris text penunjuk kode :
bagus , sangat bagus :)
udah download dan pasang, tapi belum dicobain buat ngisi blog yang pake tag code.
#11
Semantic colorization? Wow, that’d be cool. AFAIK, geshi doesn’t suffer much of the listed problem (no manual escaping of <, &, or >). But geshi does produce semantically incorrect output (<span> all over the place). Okay, If you can give me semantically correct colorized code, I’ll put your plugin on. Deal? :d
Berhubung kayaknya engga bakalan ngisi entry yang di dalemnya ada kode… ga usah ikutan install ah :d
#14 #15: uh, I can’t say I understand. could you post an example of a text, and how it is supposed to be rendered?
#19: just took a glance of geshi’s documentation and it appears that it supports semantic coloring. who knows? now that I know it is possible, maybe someday I will add syntax coloring to my plugin.
btw, the wordpress geshi plugin is still not what I want, notice that quotes in your code block are curly quotes.
I too am officially killing my plugin. Thanks for doing a much better job than me :D
Plugin yaa, coba ah ntar :) semoga ini berguna bagi saya. PASTI ;)
—-
O iya kok live previewnya hilang mas pri? yang convert dari smile langsung ke Image? kok sekarang tetep nampil text?
#24: karena terlalu pelan di komputer lama :)
Geshi test
Responded to the code-autoescape plugin post on priyadi.net, here I do the same test on Geshi plugin. Lo and be hold
Unbalanced tag: (FAILED), the body and html closing tag added by wordpress.
<html>
<head>
<title>L…
nice & neat tutorial..
priyadi is a code master :)
hidup priyadi :)>-
tes lagi ..
[...] Courtesy of Priyadi. [...]
I think it’s an issue with HTML entities perhaps. This is the code I’m using at that short URLs link:
<small><a href="<?php bloginfo('url'); ?>/post/< ?php the_ID(); ?>" title="Short URL to this post">Short URL</a></small>
Let’s see if it screws up here as well. If not, then WTF is with my blog?
Yeah, there seems to be some backward compatibilty issues:
http://www.viper007bond.com/wordpress-plugins/short-urls/#comment-74
#31: hi, i believe you hit a last minute bug which i corrected a few moment after i uploaded it. try redownloading the plugin.
All fixed. The “Force Word Wrapping” plugin I was using screwed it up. :)
Hmm, I have multi-lined code in a page content and it’s not replacing the line breaks with
<br />
so that the line breaks show up. Am I doing something wrong?http://www.viper007bond.com/wordpress-plugins/quote-comment/
#34: you should use
<pre><code>...</code ></pre>
for multiline code. it is more semantically correct.What is the license?
Why don’t you host this on http://dev.wp-plugins.org/ ?
If you do this we can use svn to keep up to date.
Thanks for the work.
#36: the license is GPL. WP plugins are not terribly big and complex which is why I’m a bit hesitant to use wp-plugins. but I might reconsider.
I guess the code necessitates that the existing uses of amp(lt); and amp(gt); in older posts will remain as amp(lt);
In other words, previously I have inserted code and used the entities for the brackets. Now that I have activated the plugin those show up as amp(lt); instead of brackets.
Put in another way, it doesn’t appear that the plugin is backwards-compatible. Is that true?
#39: that’s deliberate, otherwise we wouldn’t be able to insert literal
<
or>
, for example, within HTML/XML code snippetsWell you just contridicted yourself. If code is not meant for multiline code, then why would I use it inside a pre for multi-line code?
Not to mention pre doesn’t line wrap and that causes large problems with blogs.
Anyway, all of the experts I’ve talked to plus all of the documentation I’ve read say nothing about code being limited to a single line or chunk. It just simply says computer code.
#40: pre is a block element (just like p or div), while code is an inline element (like strong, em or span), both serve different purpose. while you can use a lone code element, an anonymous block element that you can’t control will be created by the user agent. so, it is always a good idea to put a code element containing multiple lines inside an explicit block element. of several block elements available in HTML, pre is the best choice because it is more suitable for codes: no line wrappings, preformatted, rendered in monospace font, no need to ‘br’ every end of line (br doesn’t have semantic meaning, it is supposed to be removed in XHTML 2.0 and replaced by l-blocks)
yes, we can turn an inline element into a block element using CSS (display: inline), however, we need keep in mind that not every user agent use CSS and others have option to disable or to override it.
pre doesn’t line wrap is a feature. code blocks is more confusing if overflowing lines are wrapped. a better way to handle this is by using ‘overflow: auto’
[...] Mas Priyadi pernah membahas tentang plugin untuk mengatasi masalah ini. Ok, setelah ini akan segera kita coba saran mas Priyadi. [...]
Terlau teknis untuk dimengerti. :(
Mungkin perlu training lagi nich…..;)
Re #41:
Except that your plugin doesn’t handle the pre element. And by putting using the code element inside of it to get your plugin to handle it, it defeats the purpose of using pre in the first place.
And again, please show me somewhere where it says an inline element can only be one line. While what you say makes sense, I can’t find anywhere where it states just that. Although perhaps I’m just blind…
#43: memang ‘pasar’nya untuk orang teknis pak :) orang non teknis rasanya gak punya kebutuhan untuk menulis petikan kode
#44: uh, what are you trying to propose? i wrote the plugin because i want the plugin to handle both inline code and code blocks.
this is an
inline_code()
no, i never say an inline element can only be one line. but it should be placed inside a block element to avoid implicit anonymous block element, so that we can alter its appearance using CSS.
[...] Er zijn al een paar plugins die ervoor zorgen dat je (X)HTML- of PHP-code in een post kwijt kan. Priyadi Iman Nurcahyo voegt er nog ééntje aan de lijst toe: Code Autoescape. [...]
[...] Sono pochi i plugin che permettono di inserire del codice negli articoli e Code Autoescape è uno di questi, a detta di qualcuno il migliore. Sul sito dello sviluppatore ci sono anche delle demo del funzionamento del plugin. [...]
[...] This is a test of Priyadi’s Code Autoescape plugin for WordPress. <html> <body> I pray that this works. </body> </html> [...]
I just installed it after downloading the txt file above and my site is totally screwed. Can’t get back into admin either!
how do i wrap it???
http://nunuh.com/extra/smilies-in-comments/
im posting this coz my hostees keep on bugging on how to post controlled smilies in comment page..
HOW DO I WRAP THE LINES??
never mind.. used css to wrap it.
[...] Priyadi’s Place » Blog Archive » WordPress Plugin: Code Autoescape [...]
:d good job@!
[...] Code Auto Escape [...]
[...] I have jus made the network code easier to copy/paste onto member’s blog sites (in my humble opinion) … Thanks to a plugin I found for WordPress that lets you display code directly in your blog (and comments too). If you are looking for something like that, I can honestly say … priyadi.net/archives/2005/09/27/wordpress-plugin-code-autoescape/ HART recommends it! [...]
[...] http://priyadi.net/archives/2005/09/27/wordpress-plugin-code-autoescape/ – Home – [...]
[...] LOW-Code Auto Escape [...]
Thanks for this great plugin.
I hope you plan on updating it for WordPress 2.0!
Thank you for this time saver! Keep up the good work. \:d/
[...] Nach einem Tipp von Martin Goldmann habe ich mich auf die Suche nach einem Plugin gemacht, welches mir html-Code in Posts escapen kann. Entschieden habe ich mich für das WordPress Plugin Code Autoescape. Nachdem ich mir den PHP-Code des Plugins angesehen habe sehe ich noch Chancen um das Plugin performanter zu machen indem man die regulären Ausdrücke durch wesentlich schnellere Replace-Funktionen ersetzt. [...]
nice one! i use it on my site and want to thank you for the good work. it is the best way to show the users how to use code in wordpress…
best wishes, db
[...] Code Markup Preserve Code Formatting Code Entities Code Viewer Code Display Code Autoescape** [...]
Sweet looking plugin. Appears to be just what I’ve been looking for.
But.
Does it work with the new WP2.0 editor?
Thank you very much for this great plugin! Very effective :)
[...] <post href=”http://priyadi.net/archives/2005/09/27/wordpress-plugin-code-autoescape/” description=”Priyadi’s Place » Blog Archive » WordPress Plugin: Code Autoescape” hash=”502441799d404abcbe08a07186c32626″ tag=”php wordpress” time=”2006-01-06T06:47:59Z”/> [...]
This does not seem to work with 2.0… any plans on updating?
最近愛用的plugin
å‡ä¸ŠWordPress 2.0 之後,åˆé–‹å§‹äº†ä¸€å°æ®µä¿®ä¿®è£œè£œæ”¹æ”¹åŠ åŠ çš„ç”Ÿæ´»ã€‚
除了之å‰çš„trackback issueä¹‹å¤–ï¼Œæˆ‘é‚„å°æˆ‘çš„WordPress寫作環境作了一些å°å°çš„變動,掛上幾個pluginç‰å‹•作。
首先,我把WP2.0新增的…
Thanks for the plugin. I wanted borders around my code, so I went a little further. I use div for blocklevel instead of pre, with the following code to make it wrap correctly in most browsers.
For a inline code segment I use
<span class="code_line"><code>Code Here</code><span>
For a multi-line I use
Check out my site to see it in action.
Stucco
The code is giving my a problem with some of my posts. I am posting c++ code with includes, which means using the pound sign. It seems to work sometimes and not others.
Email me for an example file it has trouble posting.
[...] Code Auto Escape [...]
Not working for me at all :( …I assume it’s not WP2 compatible? Any plans on fixing that?
[...] Also, I wanted to try out my new code display plug-in. If anyone knows of a better code display plug-in for WordPress, please let me know. [...]
super! more thanks!
The whole concept of taking the <code>…</code>, converting it to base64, and encapsulating it is unmitigated evil. Not only are
tags often assumed to be BBCode (yet more plugins), but this really is bizarre (although functional).
It works, yes – but I was looking into having it automagically nl2br() the code, then essentially a preg_replace(“<br()?(\)?>”,”\r\n”, $code) if it gets called back into the editor.
Using <pre>..</pre> doesn’t work too well for me, since it breaks my CSS, amongst other things. Any plans on updating this in the future – or tips on making my automagical br work? – being my second day of WP2, I’m slightly over my head. ;)
[...] Wer schonmal versucht hat Code online mit WordPress darzustellen, kennt das Phänomen, das bei normaler Eingabe des Codes im Admin-Bereich erstmal gar nichts passiert, bzw. angezeigt wird. Ich hatte zwar in meinem Admin-Bereich das Quicktag “code” angezeigt bekommen und versucht es zu nutzen, ist aber nichts passiert. Ein entsprechendes Plugin war in meinem Gold-Theme nicht installiert, obwohl im CSS die entsprechenden farblichen Anpassungen zum Gold-Theme angelegt waren. Kurz gegoogelt und das Plugin CodeAutoescape von Priyadi Iman Nurcahyo gefunden und die einzelne PHP-Datei in den Ordner wp-content > plugins geworfen und unter Plugins im Admin-Bereich aktiviert. Siehe da, auf einmal war was vom eingegebenen Code online zu sehen – allerdings in einer etwas chaotischen Darstellung und nicht mehr passend zu meinem Redesign. Schnell noch die Klasse “code” im CSS soweit provisorisch angepasst und fertig. Bei mir sieht die CSS-Klasse jetzt erstmal wie folgt aus: code { font: 1em; padding-left: 20px; text-align:left; color: #ccc; width: 97%; margin: 30px 0 0 0; border-left: 3px solid #313050; } Ähnliche Artikel:Websiteoptional Bug WordPressSEO Plugins WordPressSpam Karma 2 – WordPress Spam-FilterSpam aus WordPress Datenbank entfernenWP – Abbreviation Replacer (WP-Plugin)Auto Links Plugin WordPress [...]
Thanks – works a treat!
Yep, it does break the validness of the page. :(
This is my new theme that I’m working on and the validation results. The error is a result of this plugin.
Any idea how I could go about fixing that? :-?
#78: there shouldn’t a [p] before [pre]. wpautop or markdown should take care of that. perhaps you have another plugin which disables wpautop? try grepping ‘wpautop’ in your plugins directory.
It’s basically a clean install. None of the 10 plugins I have installed on that test blog mess with comment content. :( They’re all pretty much just template plugins.
#80: in that case, it’s probably caused by wp 2.0. i haven’t got a chance to make sure all of my plugins works as intended with 2.0. this gonna be a very rough upgrade for me :(.
I solved it with what looks like to be a good solution.
I just replaced the line in the plugin that adds the
<pre>
‘s with this:$content = "</p><pre>" . $content . "</pre><p>";
Validates and still shows up fine from what I can tell. :D
[...] http://priyadi.net/archives/2005/09/27/wordpress-plugin-code-autoescape/ [...]
tried using the plugin in WP 2.0.1, it wouldn’t come out right at all.. no gray background
#84: you need to define a style for your code blocks before it appears with gray background
oh, ok, sorry, kinda new to this :d
where do i place the style codes?
Hi,
I’m having some issues getting this thing to work properly. Where in the editor are you supposed to place your code tags? Alternatively, is there a way I can just upload the article in raw HTML without going through all this sillyness?
As you can see from my site atownley.org, the leading spaces are being eaten. I’ve modified them about 6 times at this stage in various permutations of the HTML editor and the WYSI[N]WYG editor, but can’t seem to figure out how to end up with nice, clean code examples like you have on the top of this page.
Any assistance would be most appreciated.
ast
Nevermind… I got it figured out now. Secret was to disable the WYSI[N]WYG editor in the preferences. I wasn’t posting code that needed to be escaped, so I actually didn’t need the plug-in. However, I’ll keep it for possible future use.
Cheers,
ast
Hi there this plug is erally what I need it !!!!
Infinite thanks. Greetz.:)>-
[...] Priyadi’s Place » Blog Archive » WordPress Plugin: Code Autoescape [...]
[...] Priyadi’s Place » Blog Archive » WordPress Plugin: Code Autoescape [...]
Hi there, I have installed this plug, but instead of give me the right resul, appear the code.
I have wd 2.02 , maybe I have missing something?
Please help me.
I Post my code snippets enclosed by
…
but doesn’t work… maybe can confict with some other plugs===??? I don’t know.
btw greetz from Italy
This is thoroughly frustrating. I have WP2.0 and I’ve installed and activated this plugin. But when I try to create a new post I have to use the WYSIWYG editor and it forces unbalanced html tags (even inside code and pre tags) into self terminated tags. If I use the html editor part it still converts it. E.g. <html> is changed to <html />. I also have the option disabled that corrects non xhtml compliant code. Unfortunately it seems I can’t use the plugin :(
i haven’t tried the plugin on 2.0 onward. and probably it wouldn’t work at all with WYSIWYG editor. try disabling the WYSISYG editor.
WordPress und Eingabe von Code
Eingabe von Code unter WordPress ist für mich ein Grauss! Mit dem Quicktag <code> bin ich einfach nicht zurecht gekommen. Formatierungen in Codeschnipseln werden einfach ignoriert, WordPress löscht Leerzeichen und so weiter und so fort. Kurz un…
Hi, I was hoping someone could help me out. I’m trying to get this script working, but everytime i save my post, it keeps changing the structure.
I’ve disabled “automaticly fix bad xhtml” and “Visual Rich Editor”…
I need some help… I’m using WordPress 2.0
Just wanted to thank you for the very useful plugin!
Nice plugins mas Pri. Thanks \:d/ This is what I have been looking for this whole day. I am going to install and try both yours and Code Snippet.
But ..ta donlot tapi kok gak bisa yah? then bisa kedonlot tapi cuma 1kb and encrypted, and make my PHPEd Hang :-( [-(\
Any comments .. CodeSnippet vs Yours ?
Code Markup in WordPress
Wer schon einmal versucht hat Code direkt in WordPress einzugeben wird wissen, dass das zu den wildesten Fehlinterpretationen führen kann.
Ich war deswegen auf der Suche nach einem WordPress-Plugin, das die Problematik beseitigt. Das im Moment beste …
Thanks! You plugin was verry helpfull. I am using is in my website (still in development). But i’am gooing to write a article about this plugin (in dutch) and will refer to you site if you don’t mind.
Thank you!
Works like a charm! Very usefull plugin.
Thanxs for the plugin but it doesn´t work in my case.
Please, can you try it with the code
Thanks for the script. It was very useful.
I have modified it to allow the use of textarea tags to use it with my source code syntax highlighter.
You can get the modified version if you want from http://blog.nkadesign.com/
test
a code
Thanks for this. Working fine.
Priyadi, I am planning on modifying this plugin to include some CSS and to include line numbers. Would you be interested in merging this into the official plugin?
This looks like a very nice plugin and just what I am looking for. But I am using WP2, does it work in WP2?
for test ^^
pri.. autoescapecode nya rusak ya? aku donlod kok kepotong? jadi gak jalan :(
*ps: akhirnya aku pake coolcode*
*nunggu perbaikan punyamu, soalnya kayaknya lebih asik* :)
i test this plugin in my testblog :)
I’ll install sooner this Plugin on my WordPress Blog.
Thanks a lot! :)>-
Thanks a lot for your plugin – searched long time for something like this.:)
I will review it on my site.
cheers,
Felix
did you forget to include the closing php tag in your .txt file?
for example:
?>
#114, #115: that’s deliberate :) otherwise some people will put extra whitespace at the end complain here why the script doesn’t work with error message ‘cannot add header, output already sent’ or something like that
Nice, it really help me! :)
I just wanted to tell you:
The plugin kills itself if you do not user the WYSIWYG-Editor! See german forum: http://forum.wordpress-deutschland.org/showthread.php?t=15675
Hi! I’d like to know if it will work fine with WordPress 2.1…
Tks!
It doesn’t seems to be working with WordPress 2.1… :(
I didn´t understand your previous comment about the extra whitespace in the code.
Should we add the missing “?>” at the end of the the code?
Thanks for the great plugin
Thanks! It works fine for me with WordPress 2.1
I use it on this page. :d/
Displaying Code Easily…
Do you have a need to display code on your blog? Great, well here is a plug-in that I found.
Since I am writing articles and a blog about blogging, and sometimes things that need code for your page. I have looked over the internet to find a plug-in tha…
I seem to have a minor issue with WP 2.2 that I’ve not had a chance to take a look at yet. It seems that the anything inside the
tags is being base64 encoded. In addition, any ' \ " etc, are being escaped with \, so ' becomes \'. The tricky bit comes when trying to edit the code, because if you edit an article, it stays base64 encoded, making it impossible to edit.
Any ideas before I go rummaging around? You can see an example of the slashes here:
http://jon.netdork.net/2007/05/20/bash-magic-to-save-you-time/
Thanks
Thanks for plugin, I’m using it in my blog.
http://airman.myphotos.cc/2007/05/23/verifikaciya-wordpressu-google/
Regards
How to build Dean Lee’s Syntax Highlighter from latest components…
Ron Fredericks writes: In my last two posts:
I discovered Dean Lee’s Code Highlighter plugin for WordPress as the blogging solution for my source code display needs.
I fixed a word wrap problem in Dean’s plugin.
During my research to solv…
Cool stuff :)
I am PHP Programmer. I have a requirement from my client that needs to be fixed.
He have a wordpress-mu (1.2.1) intalles and there are several blog sites are running under it. This is his feedback,
†We’ve had issues posting HTML into wordpress. WordPress wants to format the html after we post an article. Even if we only use the “Code†tab, the wordpress system will try to format what was pasted in. Here are some examples of the formatting:
formats out javascript tags
adds after each carriage return
changes — to –
Please look into creating a plugin that will bypass *all* the formatting when we post an article through the Code tab.â€
Please suggest on this.
Thanks
Naveen
This is a great plugin. This type of is priceless for the new kid on the block.
Thanks
Vic
Hey, just want to let you know that you’re missing the closing php tag in the download file (
?>
).Also, ‘please’ consider adding basic code colorization =P (without having to compromise other features of course :)
would like to test long line of code.
http://thisisatestlink.com/testtesttest/english/test/wordpress/
Have been using your code for about a year. Works well!
check it out at:
http://news.smartlabsoftware.com/
supaya gak tembus gimana ya mas??
LHA? disini ada scrollernya yach? gimana buatnya mas? terus kok ada tanda #-nya? Ajarin duongk?? :)
Well, i try it, ok… this is a big code, and, i don’t know what ar te effects… let see…
Thanks pak pri, pluginnya berguna sekali. tapi kenapa di wordpress saya selalu “Left justify” aau rata kiri. spasi atau tabulasi masih otomatis dihilangkan pada saat posting disimpan…
Thanks for a nice plugin. However, I have made some small modifications to make it work with jQuery Chili instead of Geshi. So if client side syntax coloring is needed my mod could be interesting: link to modification
Thank you very Much! It also works with wp 2.5!
very very good thanks
This works great, but since upgrading to WordPress 2.5, I’ve been using the Visual Editor increasingly often, including when posting code. Thankfully, it already escapes ampersands and angle brackets.
If I use this plugin to protect against “- -” (without the space) getting converted to a long dash or various other WordPress typographical conversions… well, the ampersands and angle brackets are messed up (the ampersands in the escaping provided by the Visual Editor are themselves escaped as ampersands by this plugin, creating a big mess.)
Any possibility of *not* escaping entities if they are already escaped?
Without it, it’s basically impossible (or at least exceedingly impractical) to use this plugin while using the Visual Editor.
This plugin actually does nothing at all, except turn any code blocks in your blog into base64 jibberish. Lovely.
:)Thanks for plugin, I’m using it in my blog.
Hi there,
Know anyone which plugin to use if I want only a part of the article to be displayed? If someone want to read more there will be a “read more” link…
On my blog right now is displayed all of article content and I don’t want this…
I’m talking about the latest 10 articles displayed on the first page of my blog.
I’m using WordPress.
Can anyone help?
Thanks for the plugin. It works great.:) I am migrating data from a wiki and it appears that the wikis out of the box do a better job at preserving XML content. Now I just need to figure out how to get the pre code content to display in a pretty box.
Thank you very much for this plugin!
10 excellent & promising WordPress Plugins, some brand-new…
A little while back, we posted a list of 8 and a half excellent WordPress Plugins you probably didn’t know about. It was a reaction to our community voting for more WordPress related stuff, such as themes and plugins and tutorials and goodies. We…
pluginsnya bekerja!
tapi supaya di highlight (ada backgroundnya gitu) ada caranya gak ya?
Hey mate,
looks like this doesnt work for my fresh wordpress installation version 3.xx
i dont get these grey boxes around the code. Is the box style implemented in this plugin?
when i use the
....
, it looks like before with the standard integrated wordpress”code”-viewany idea?
take care
timo
Great Plugin, thanks!
I tried this, but it shows extended space below and also the tags used for the code section. So not working in that way.
[...] kinds of codes without having to fiddle around with the php code of the various WordPress php files.Code Auto Escape – escapes code automatically which is nice if you post code snippets from time to [...]
[...] http://priyadi.net/archives/2005/09/27/wordpress-plugin-code-autoescape/ [...]
[...] in Movable Type are much better at handling this kind of thing). Solved with Priyadi’s Autoescape [...]
[...] Priyadi’s Place » Blog Archive » WordPress Plugin: Code Autoescape. Dieser Beitrag wurde unter Randnotiz abgelegt und mit Auto Escape, Code, HTML, PHP, Plugin, WordPress, XHTML verschlagwortet. Setze ein Lesezeichen auf den Permalink. ← Exclude category from front page only in Twentyten [...]
[...] Code AutoEscape [...]
[...] gibt es diverse Plugins, die Abhilfe schaffen. Für diese Seiten habe ich mich für ‘Code Autoescape‘ entschieden. Das Plugin ist nicht über den normalen WordPress-Downloadbereich zu bekommen, [...]
[...] och kodstycken visas pÃ¥ ett snygg sätt. Till kodvisning använder jag tillägget Code-Autoescape. Sen har jag ändrat lite i css-filen sÃ¥ att ”kodboxen” blir snyggare. Det var lite [...]
[...] del 27 Gennaio 2007 ore 2:55: il plugin Code Autoescape, utile a formattare correttamente del codice all’interno di un post non è più funzionante [...]
[...] плагин называетÑÑ Code Autoescape. Переходите по ÑÑылке и Ñкачиваете плагин! Там на [...]
[...] Ðужно уÑтановить плагин Code Autoescape [...]
[...] was the reason why I stuck with Code Auto Escape for so long. Entering source code is awkward, to be sure, but nevertheless the plugin is pretty [...]
[...] snippets than mine does. Since time immemorial I’ve been using a very simple plugin called Code Auto Escape, which merely allows you to type code verbatim into your posts without having to go through all the [...]
[...] Code Auto Escape – Automatically escape code within � tags. Now and then, you may need to give an example of some HTML code, but you want users to be able to actually see the code, and not the rendered results. Wrapping them in these code tags will enable you to do that. [...]