Raw HTML Plugin for WordPress
Introduction
Recently I needed to put some style definitions and a JavaScript function in a post on another blog that I have. I wasted several hours trying to do this, because WordPress insisted on putting backslashes in front of my apostrophes, inserting superfluous <p> or <br /> tags in place of newlines, and generally breaking my HTML in various horrible ways.
In the end I decided to just go and write a plugin that would let me put any code or script (e.g. JavaScript) in my posts and display it to the visitor unmodified.
Download & Installation
raw-html.zip (3 KB)
Requirements :
- WordPress 2.6 – 3.0
- Disable visual editor for better results – some characters (e.g. the ampersand) may still be encoded if it’s enabled.
Installation is straightforward – download the zip file, unzip, upload the raw-html folder to /wp-content/plugins and activate it in the Plugins tab.
Usage
There are two ways to use the plugin. First, to turn off “smart quotes” and other built-in filters for an entire post, use the checkboxes that Raw HTML adds to the “Write” screen (requires WP 2.5+) :

If you want to prevent a specific part of your post or page from being processed and “texturized” by WordPress, wrap it in <!–start_raw–>…<!–end_raw–> or [RAW]…[/RAW] tags. The two versions work exactly the same, but the latter may be handy if you’re using the visual editor (not recommended).
Example :
<!--start_raw-->
This
is
a 'test'!
<!--end_raw-->
Result :
This
is
a 'test'!
If you view the source code of this page, you will see that the newlines are still there, and the apostrophes haven’t been converted/escaped.
Other Notes
This plugin is provided AS IS, with no guarantee that it will work on your site. If it works for you, consider yourself lucky
Thank you!
[...] een plugin gevonden voor wordpress waarmee de embedded items van de VRT wél te integreren zijn in wordpress. [...]
Hope you can help.
I’ve installed the raw html plugin and turned off the visual editor in my profile to be able to have more control over the formatting of my posts. Embedded images show up fine on the home page, but have path problems in the archives and comment pages because of the dynamic directory structure
I have been hard coding my image paths inside posts
I can see that’s problematic and have found I should be using something like /images/vd_competitive.gif”
Since I’m operating inside the raw plugin tags… do I need to escape the bloginfo tag.
This should be simple. Do the template tags only work in the visual editor context. Help, this simple issue is really frustrating and I’ve found several threads on much the same topic but none anticipate the raw html issue.
…I’m afraid I don’t get it.
The bloginfo() template tag is a PHP function. Normally, it will not execute when placed inside your posts. You can use a different plugin, like ExecPHP, to make it execute.
However, if you place it inside the <!–start_raw–><end_raw–> tags, it will not work. This is intentional, and the whole point of the Raw HTML plugin – to prevent WordPress (and other plugins, like ExecPHP) from parsing/changing parts of your posts.
[...] Raw HTML is a WordPress plugin that allows you to put any code or script in your posts and display it to the visitor unmodified. [...]
Let the bells ring and the banners fly!
I’m sure you know you aren’t alone in being frustrated (read: head/desk happens way too often) by WYSIWYG’s behavior. I’ve been having an on-going exchange with Stephen Cronin in his blog and I’ve put together what I hope is a pretty comprehensive resource list at codex.wordpress. My point is: you’re responding to a very real need!
Would you do one thing for us? Would you, either here with an update or in another post, tell us what the plugin affects or changes to tame the editor?
TU!
–bentrem
*sorry, forgot to enable “Notify”*
bdt
[...] to “taming WP WYSIWYG” (thanks to Stephen Cronin for the heads up on this): “Raw HTML Plugin for WordPress” – “To prevent some part of your post or page from being processed and “texturized” [...]
The plugin doesn’t “tame” the editor in any way (that’s why I say that using the visual editor is “not recommended” in my post).
Actually, it only runs when a post is displayed. The plugin intercepts the content surrounded by the special tags and saves it in internal variables before WordPress can “prettify” it. Then, after WP is done messing with the rest of the post, it adds back the “raw” content in the right places.
So the visual editor is still at large
Wow! “plugin … saves it in internal variables before WordPress can “prettify”. Then … adds back the “raw” content in the right places.” *whooot!* That’s amazing!
Please don’t take this as diss: goes to show what lengths we’ll go to in order to escape WYSIWYG’s clutches! ;-P
thanks for this
cheers
You’re welcome
Any way you can integrate htmLawed into this plug-in? Among other things, htmLawed can be used to restrict HTML tags as well as to balance them.
Not integrate, but it looks like an interesting idea for a new plugin. I’ll think about it.
Very good!
Thanks for this
Thank you really. I have used it in my site and it works well. Keep on!
[...] Raw-HTML leaves the HTML you hand-code in an individual post alone. In other words, the WP engine doesn’t b0rk your HTML. [...]
thnak you
[...] Raw HTML – Best plug-in ever. Allows you to wrap PHP/HTML/PHP codeblocks in special comments which prevent WordPress from reformatting or encoding them (shocking this is necessary, but a very welcome plug-in) [...]
[...] Raw HTML. This WordPress plugin could come in handy. [...]
It seems WordPress 2.5 doesn’t like the plugin. Will you be updating it?
I hope so
Thanks
Yes, I plan to eventually update all my plugins for WP 2.5. I’m working on the Single Click Updater plugin at the moment.
Thanks for the plugin.
We took a different approach to the vagaries of the WordPress visual editor – which does terrible things to code of all times. Instead of fighting a losing war with the built-in WYSIWYG editor, we wrote a hardcore adaptation of FCK including an integrated image uploader-manager specifically for WordPress.
We still do have some issues with trying to place straight code (particularly html code) within a post. After flipping back and forth between WYSIWYG and source, the angled brackets turn to html entities, like it or not. We’ll try to adapt your code to Foliopress WYSIWYG.
Looks like the WP 2.5 editor is a bit more flexible in this regard, though obviously not perfect. Anyway, good luck
Love this plugin. Would love to see 2.5 compatibility. Would also be interested in donation when it’s done.
Thanks
You’re welcome
By the way, have you tried using the current version in WP 2.5? I haven’t done in-depth testing, but it seems to work OK on my blogs that are running WordPress 2.5.
Guess I’ll have to finally put up a “Donate” button on the site.
Not yet, I’ll try it on a separate blog first. I’ve put too much work on my current one to screw it up.
Yes, I’d be happy to donate. Your plugin is exactly what I needed.
Test site looks good, I’ll convert to 2.5 sometime this weekend. Donation on its way, thanks again for the plugin!
Thank you
this is a critical plugin for my site, since all my posts use it, I’m terrified of upgrading to 2.5 and having things fall apart.
From the last comments in this thread, it sounds like you think it should work, have you come across any issues since you made that comment a couple of weeks ago.
I might take a crack at the 2.5 upgrade this weekend.
I’ve updated to 2.5.1 recently and the plugin seems to be working still.
Michael,
Same as you, all my post (112 of them) includes this plugin. I’ve converted to 2.5.1 and no problems at all. In fact it looks like 2.5 is a little more html-friendly. But I still require this plugin to work my blog.
I did create a test blog (seprate site) and tested it first before I converted. You should probably create a test blog too just to be safe.
So, if im trying to add in a youtube video will WP still reformat the objects?
I don’t know, I haven’t tried adding the videos directly (I used a plugin when I needed to insert a video). It would also depend on the WP version – 2.5 is said to be more forgiving in this regard.
Ive just come across your plugin, I’m using WP 2.5.1, because I need to add a few tables within my pages.
I did as instructed, unzipped, uploaded, activated and tried a simple table inclusion.
I used the ….. syntax and it worked a dream.
Brilliant plugin, thanks very much
Voddie
Hi all great information here and good thread to comment on.
Can I ask though – how did you get this picked up and into google news?
Very impressive that this blog is syndicated through Google and is it something that is just up to Google or you actively created?
Obviously this is a popular blog with great data so well done on your seo success..
Ah, so it’s in Google News? Interesting…
(or is the comment just very clever spam? in that case, congratulations, it works well
)
Tnx a lot for this plugin dude, it’s the best plugin I use on my blog!
btw, what’s the changes on 1.0.4?
@Hikari – Just a small bugfix in 1.0.4, no changes in functionality.
thanks for the raw html =)
שיש,שישלמטבח,שיש למטבחים
Hi,
I’m having some problems with this plugin. Posted a feedback here: http://wordpress.org/support/topic/187334?replies=1#post-798122
Using 1.0.4, also tested in new wordpress 2.5.1 installation with no other plugins.
Thanks a lot
[...] solution was simple with the help of yet another plugin. This time, I turned to Raw HTML from W-Shadow (see also the WordPress Official Plugins Directory page for Raw HTML. That plugin [...]
Great Blog…Looking to captilize from blogging as well.
Good plugin.
This is a nice plugin
Thanks…..
Love this plugin. Would love to see 2.5 compatibility.
@gazete oku – I think it’s compatible, though I haven’t tested it extensively. This blog uses WP 2.6 and the example in the post seems to work correctly.
I am not sure if it was the recent WP update or what, but this plug-in doesn’t seem to allow for php to be executed. If you view source, it simply prints the php source code. None of it is parsed. :/
Any advice?
- Esteban
@Esteban – This plugin was never intended for executing PHP. You will need a different plugin like Exec-PHP for that.
(testing possible commenting problem…) (this post can be deleted if it works) (sure wish i had comment previewing…) (btw, the problem was with FF3 and I am trying this on IE 6 now)
@White Shadow – Oh. I didn’t realize that. When I read the description, it said “In the end I decided to just go and write a plugin that would let me put any code or script in my posts and display it to the visitor unmodified.”
I thought any code included php. Did you mean only Java script and html?
As for Exec-PHP, I do use it. however, unless you enclose the whole post in the php brackets, WordPress will add parsing. That is why I was excited about your plug in. Here is an example (curlies instead of brackets):
CODE with Exec-PHP:
——————
line 0: {?php echo “stuff”; ?}
line 1:
line 2: {h1}title{/h1}
line 3:
line 4: {?php echo “more stuff”; ?}
WP output with Exec-PHP:
——————
stuff
TITLE
more stuff
——————
As you can see, there are line breaks added because WP is annoying. lol.
Now, with your plugin, what I had hoped to do because I thought in included php code was the following:
CODE with Exec-PHP and Raw HTML:
——————
line 0: {!–start_raw–}
line 1: {?php echo “stuff”; ?}
line 2:
line 3: {h1}title{/h1}
line 4:
line 5: {?php echo “more stuff”; ?}
line 6: {!–end_raw–}
——————
Desired WP output with Exec-PHP and Raw HTML:
——————
stuff
TITLE
more stuff
——————
Anyway, that is what I expected since you said that we code execute ANY code or script. :/
It’s okay if you don’t want to include this ability. I don’t want to tell you how to right your code and I CAN echo all the html with php (which would be annoying, but possible).
I do hope you can update this post though to better reflect what “any code or script” means.
Thanks for all your work my friend!
Esteban
(Ps – I don’t know what was up with your WP-SpamFree plugin, but I wasn’t able to post this with FireFox3.)
@Esteban – Yes, it was for JS/HTML. And your example might work if you did it like this :
line 1: {?php echo “stuff”; ?}{!–start_raw–}
line 2:
line 3: {h1}title{/h1}
line 4:
line 5: {!–end_raw–}{?php echo “more stuff”; ?}
Though that would likely become tedious in practical situations.
WP-SpamFree might cause problems if you have JS and/or cookies disabled, but there may be other possibilities that I’m not aware of.
@White Shadow – Thanks for the type. Unfortunately, I have tried that as well. I basically used the {!–start/end_raw–} tags to kill WordPress auto-formatting. You simply can’t use RAW HTML with Exec-PHP.
Echoing line by line or even in EXCERPTS can be handy, but when you want to print variables within it, that it turns out to be a problem. :-/
Anyway, thanks for the replies. Also, thanks for plugging the Javascript addition in there. I think it will clear thing up for folks. Now it’s time for me to either find another plug-in or write one myself (which will suck because I know in two weeks I will find out that I just reinvented the wheel and someone else already did it. lol)
As for the WP-SpamFree, it warned me of the exact problems you suggested both of which were not the case. All well. That’s why I use multiple browsers.
@White Shadow – PS, the last post was in FF3 and worked this time. lol. I love the consistency of inconsistency.
@Esteban – Ah well, good luck
Great, works on a 2.6.1 (test, different theme) blog I’m considering migrating to – from 2.3.3 – it allowed me to put html tables into a page, I was pulling what’s left of my hair out before !
Many thanks, Alan.
This is -JUST- what i was looking for. Thank you so much!
[...] Raw HTML позволяет вставлять при написании / редактировании [...]
This plugin is a lifesaver. Simple and effective. Just a note, it’s not compatible with the tinymce-advanced plugin. Thanks a million!
@Aardvark – Yes, it hasn’t been extensively tested with the visual editor.
[...] Raw HTML capability; [...]
Is it possible to apply the plugin to all posts and pages? (without using the [raw][/raw] every time)
@nirsound – not in this implementation, but it’s an interesting idea.
This is a great plugin
I’ve been looking all over the Internet for a way to do this. Thanks for sharing and making my day even better!
Thanks! I am looking forward to general setting “Apply Raw HTML to all posts and pages” in the next release….
Meanwhile, can you think of a simple change to the plugin code to force wordpress to default to Raw HTML mode? (without writing the {!–start_raw–}{!–end_raw–} every time)
When I finally get around to updating my old plugins, perhaps
[...] HTML Update The Raw HTML plugin has been updated! In case you didn’t know, Raw HTML is my WordPress plugin that lets you use [...]
[...] Another case if we want to put any special characters (apostrophie, quote) and any script. To enable javascript and put RAW HTML inside wp post, we must install RAW HTML [...]
I really love this plug in (the raw html one). I am new at wordpress blogging and it was so easy!
Thanks!!
tnx a lot, this is the most critical plugin I use
Unfortunately, when I tried this, I still had the problem I was having before – with the auto-formatting, if I put line breaks in my table coding to make it manageable, there will be a huge block of space above each table, the sum of all the line breaks in the coding. on LJ, I know that turning the auto-formatting off will fix that and I was hoping that this would do the same. Unfortunately, I still got the large chunks of space, both when I checked the box and when I ran the !-start_raw codes.
Hmm, how about an example of the problematic HTML?
Was wondering, (new to WP) how one goes about disabling the Visual Editor?
Thanks.
You can turn off the visual editor in Users -> Your profile. Tick the “Disable visual editor when writing” checkbox on that page.
OMG, I don’t know how I missed that [embarrassed]. Thank you.
Great plug-in too btw, thanks for sharing.
Thank, you! This is a fantablous plugin!!!
I’ve used this in the past and it’s worked brilliantly – however with a fresh install of WP 2.7 -> 2.71 it seems to be ignored… anyone else having this problem?
I’ve upgraded to WP 2.7.1 on this site and it seems to be working fine.
[...] で、WordPressの自動整形を止めるプラグインを探してみた。 まず試してみたのがRaw HTML capabilityプラグイン。 [...]
As a follow up to my comment yesterday, I found that a plugin – “Secure and Accessible PHP Contact Form” – conflicted with one of the other plugins I had installed, and after removing it your plugin also seems to have returned to its former glory – two birds with one stone!
Do you mean http://green-beast.com/blog/?page_id=136 Contact Form?
Also: which plugin was causing problems?
(Information is power, yes?)
Thanks for the plugin, exactly what i was looking for.
Perfect! Thanks a million!
RAW HTML is incompatible with CFORMS II
Basicially, Raw HTML automatically adds a tag at the end of most of the fields created by Cforms
oh, and I am using WP 2.6
This will be fixed in version 1.2. You should get the update notification in your WP Dashboard within 24 hours.
Hello, thanks for your work on this plugin. I’m having some issues. I’ve got WP 2.6.3 and I don’t get an options box added to my write or manage pages. I’ve used the card code method and that seems to work to a point. WP is still stripping out line breaks and also non breaking spaces in my html. This happens when I paste as html then switch to visual editor, then back to html. I can’t turn off visual editor because eventually I have to hand this over to a client who will want a wysiwyg. I never really got why wordpress is rewriting code anyway.
It strips the paragraph tags out of the raw code as well.
As noted in the post, the plugin isn’t really reliable when used with the visual editor. Unfortunately I’m not sufficiently familiar with the inner workings of the editor to fix this (at least at the moment). Sorry.
[...] Raw HTML Plugin for WordPress Raw HTML Plugin for WordPress doesn’t let WordPress to put backslashes in front of apostrophes, insert superfluous tags in place of newlines, and break HTML in various ways. This plugin lets you put any code or script (e.g. JavaScript) in your posts and display it to the visitor unmodified. [...]
Mike, I had the same issue with missing options before I upgraded to 2.7.1. Now it works great! Thanks for this plug-in. I was so frustrated with WP putting paragraph tags around my images and breaking my layout.
[...] Raw HTML Plugin for WordPress [...]
I am trying to add an affiliate to my site. However, each time I add the code and publish. The code remains there it does not convert to a button. Is this something I need. I am not sure what I need. This is very confusing to me. Can someone please help me.
Tracy, Can you be more specific. Perhaps show the code and the page where this is happening. And firstly, have you determined if the code is working o.k. outside of wordpress…like on a stand alone HTML page?
[...] Raw HTML capability [...]
Hi, there!
Multiple code blocks of [RAW] … [/RAW] do NOT work well in one passage, would you please fix that?
Thank you!
And by the way it’s a very useful plugin!
Thank you!
it’s a very useful plugin
@ Shane : Fixed in 1.2.2.
One question. Does it remove the “auto p” from images as well?
I haven’t tested it, but I think it would.
@White Shadow
Thanks for your work!
Brilliant!
[...] Leidsin ka võimaluse kuidas WordPressi all sisestada javascripti ja teisi HTML tag’e. Selleks on vaja plugin’at nimega RawHTML [...]
[...] Raw HTML Plugin for WordPress Raw HTML Plugin for WordPress doesn’t let WordPress to put backslashes in front of apostrophes, insert superfluous tags in place of newlines, and break HTML in various ways. This plugin lets you put any code or script (e.g. JavaScript) in your posts and display it to the visitor unmodified. [...]
What changed on version 1.2.3?
BTW, what plugin do you use to have this “Manage your subscriptions” feature?
I partially replaced regular expressions with simple string manipulation because regexps were hitting some ridiculously low input limit when processing long posts. You won’t notice any difference if you didn’t have this problem.
I use the Subscribe to Comments plugin for that feature.
I would love to see an option that forces RAW on everypost. Or every new post I should say.
Thanks!
Mmm, a settings page with a single option… pretty unlikely.
[...] Raw HTML capability — δεν γίνεται προγραμματιστικό blog χωρίς αυτό [...]
Hi Janis,
I think Raw HTML is stripping paragraph tags even on posts/pages where I haven’t told it to. For instance, I’ll add carriage returns in the visual editor, or I’ll add tags by hand using the HTML editor, and they’re always stripped out. I’ve tried deactivating the plugin, but that doesn’t help. This wasn’t happening before I installed Raw HTML.
This is on a new blog running 2.7.1 (and Raw HTML 1.2.3)
Have you seen this before?
If deactivating Raw HTML doesn’t help then the problem probably wasn’t caused by this plugin in the first place. The plugin doesn’t make any persistent changes to a blog – deactivate it and it stops. The plugin-specific tags (e.g. <–start_raw–>) would remain in the post (if you inserted them) but they wouldn’t do anything.
Få din egna HTML-kod att fungera i WordPress-inlägg…
WordPress är inte speciellt bra på att acceptera HTML-kod i inlägg. Koden förvrängs som regel med radbrytningar, taggar och en del försvinner helt enkelt. Om du någon gång provat att klistra in ett par rader Javascript så vet du vad jag menar…….
!RAWBLOCK0!
There is a problem with the latest WP ??
I get this with just
This
is
a ‘test’!
or even just puting
And nothing else.
Are there compatibility issues with other plugins??
I received a similar report a few weeks ago and it turned out to be a compatibility issue with the “Share On Facebook” plugin. It’s probably something similar in your case.
Can this plug-in be used at the latest version of WordPress 2.8.4?
Yes. As far as I know, it should work fine.
Hello, long time I don’t come to your site!
And I came again to ask the same question, what changed on v1.2.4?
A changelog was added
Check the readme.txt, or here. No changes otherwise.
THANK YOU! THANK YOU! THANK YOU!
God, it was killing me that when wordpress was stripping/changing my div tags and such.
[...] [...]
Hi, when I installed the plugin on one blog it works great, however when installed on another blog I can see my code in the page source!
Do you know what the problem could be?
What do you mean by “see [your] code in the page source”? What code would that be/why is that bad?
for wordpress MU 2.8.4a the only way I could get the autop to not add the p tags to my content was to comment out the call to wpautop in wp_richedit_pre method in wp-includes/formatting.php.
function wp_richedit_pre($text) {
// Filtering a blank results in an annoying \n
if ( empty($text) ) return apply_filters(‘richedit_pre’, ”);
$output = convert_chars($text);
// $output = wpautop($output);
$output = htmlspecialchars($output, ENT_NOQUOTES);
return apply_filters(‘richedit_pre’, $output);
}
[...] The boys of lightly seasoned were looking for a way to disseminate their events, pictures and videos. The more I work with CMS built sites (WordPress in this case), the more I buy in to the idea of owner of the site maintaining the content without knowing or writing a lick of code. The events calendar is fed from a user owned Google Calendar making use of the wpng-calendar plugin. The pictures live in a user owned Picasa account and makes it way to the page courtesy of the shashin plugin. To bring the JavaScript to the page, I make use of the Raw HTML plugin. [...]
Amazing plugin! ++++
thank you for a good tool.
[...] post by White Shadow and syndicated here by [...]
Well done! Big thanks for you from Russia! This plugin has really help for me.
Can you make this compatible with the Intypo plugin? Thanks!
Done. The update will be up on wordpress.org in a few minutes.
RAW-HTML I had view a lot of plug-ins to find this one. Hell yea…this was exactly what I was looking for. The reason I needed this plug-in was all the Google Docs plug-ins that I had used…failed! This plug-in is in fact the most successful plug-in to use for embedding Google Docs.
It worked!!
I embedded a google form on my wp site!!
Yay!
Thank you!
Wow that great. Thanks for that pal..
It works great on Posts how can I get this to work on Pages?
Normally you don’t need to do anything special to make it work on pages. Can you think of anything unusual about your pages that might be causing the problem? Non-default templates? Some kind of page plugin (whatever that might be)?
For whatever reason it Pages mess up my HTML as bad as Post… Huge spaces all kinds of line breaks….
For now I will forward my pages to a post and use this great tool.
Unless someone has experienced this crazy problem.
Thanks WS
I’m sorry, but I can’t see where everyone is having these problems, even in the latest edition of WP. For most of these issues regarding html, a simple html editor can be used first to test the html. When applying the plug-in, I had never experienced any difficulties where the plug-in didn’t work. Is there anything that anyone would like me to try in attempt to localize any further issues?
hello!
how about, instead of having 4 custom fields for each post, having only 1 and storing the 4 values in a string?
It would avoid cluttering the database, since each of them is a simple boolean value.
For backward compatibility, everytime a post is read you verify both cases, but for writing you always try to remove old custom fields and update it with new one.
Wordpress should natively have options to remove these filters from posts, tnx for the plugin
The example worked fine. Then I tried on frame redirect code and no redirect. Does WP filter anyway?
Could you post the code you’re trying to use? I’m not quite clear on what “frame redirect code” means.
[...] automatic formatting functions from wordpress. No more useless P-tags in the middle of your post andVisit plugin site »9 – Shadowbox JSA javascript media viewer similar to Lightbox and Thickbox. Supports all types [...]
[...] Raw HTML capability 修正wordpress的自動修正語法不當的狀況(例如美式的引號會被轉成其他符號)。 [...]
Great plugin. One question though. How would I get the code to process other shortcodes inside the [RAW] tags? I use a lot of short codes, and the plugin just echoes the short code tags instead of processing them.
In short, you can’t. The whole point of this plugin is not to let WP modify anything within the [RAW] tags. So not executing shortcodes is by design.
[...] nazywa się Raw HTML http://w-shadow.com/blog/2007/12/13/raw-html-in-wordpress/ i doskonale się to tego nadał. Po prostu we wpisie umieszczamy tagi <!–start_raw–> i [...]
After I posted that, I realized what a stupid question it was. I don’t need to wrap my code in RAW tags. I just disable autop with the checkboxes and all my shortcodes work great.
@Ryan – Good on yuh for saying so. In my experience it’s just that sort of “mistake” that gets me chasing my tail … horribly frustrating to over-look the obvious.
cheers!
Hi,
I would just like to say “Thank-you” for making such a time saving plugin! I spent all of today trying to add an html page to WordPress. It wasn’t as easy as just copying from the to . Your plugin was the light at the end of a dark tunnel! This dark tunnel lasted the whole day!
Thank-you, Thank-you!!!
It seems this does not prevent all WOrdpress filtering. I am trying to use some nonstandard HTML tags within post and even with this plugin, Worpdrepss stil manages to completely remove those tags.
It does not happen if I enter tags in HTML mode and save post. It happens when I enter tags in HTML mode and then just switch to WSYIWG mode. Tags are deleted at once.
I need those tags as they are used for additional formatting on post display which I do from my plugin.
Is there way to prevent this kind of filtering HTML?
This plugin does not affect the visual editor in any way. It’s purpose is to deal with the filters that WordPress applies when displaying the post on your blog.
Solution : Don’t use the visual editor when you need to use non-standard tags.
I also noticed that plugin does not work on posts displayed on first page in blog, and RSS feeds.
Hmm, I’ll put fixing that on my to-do list.
[...] Raw HTML Plugin for WordPress Raw HTML Plugin for WordPress doesn’t let WordPress to put backslashes in front of apostrophes, insert superfluous tags in place of newlines, and break HTML in various ways. This plugin lets you put any code or script (e.g. JavaScript) in your posts and display it to the visitor unmodified. [...]
Simply, i love you
I would LOVE to see the default settings on for this plugin… Any chance to have it?
I’ll add it to my to-do list, but it’s unlikely to get implemented any time soon.
Thanks! Although if someone installs this plugin, it’s likely he’s using it so changing the default box to checked would save time for most of us. It’s just 4 extra attributes in HTML, please consider an earlier upgrade
Right.
* 4 extra HTML attributes.
* An extra (per-user?) option in the database for storing the default settings.
* New UI elements for setting the defaults.
* Additional code for loading/saving the defaults.
* Additional code for removing the defaults on uninstall.
* Additional code for handling edge cases (what about posts created before the new feature was added?).
Yeah, I know. I just ment you to hardcode the attributes into the plugin, since I know it’s a lot of work to implement it in the panel. Although you make a point about the edge cases. Too bad
A temporary solution would be a “remember selection in a cookie” checkbox. How about that?
Argh, fine. I’ve added a “Raw HTML defaults” panel to the “Screen Options” box (and it only took me two days to figure out how to do that
). You should get an update notification soon.
Awesome!!! Thanks, m8!
“I’ve added a “Raw HTML defaults” panel to the “Screen Options” box…”
I’ve just updated and looked for this panel and can’t find it anywhere
Any ideas?
What’s your WP version? It will only show up in 3.0.
BG: it shows up when you click “screen options” in the top right corner during new post composition.
This works fantastic, you just saved like an hour of everybody’s lives
The default settings should also work when I uncheck the RAW HTML box in the screen options, correct?
Mmm, no. But you can collapse the box and put it at the bottom of the page, and the defaults will be applied when you save/update a post.
Ok, thanks
Got it now, many thanks!
[...] Raw HTML capability by Janis Elsts [...]
Just wanted to let you know that the defaults do work even if the raw html box is hidden in the screen options. Testen on a handful of posts

This is great!
You may want to consider adding a explanation on where to find the defaults. The FAQ of WP Plugins repository would be a good place to publish it on
Right.
Doesn’t work for me – WP 3.0.
jamey try this: http://catb.org/esr/faqs/smart-questions.html
I’m having a weird issue where this plugin works perfectly for some users, but strips ids for others.
I’m using WordPress 3.0 with multisite turned on. Users who are Super Admins on the site have no trouble; everyone else is having trouble.
What do you mean by “strips ids”?
I have a chunk of code:
[RAW]
stuff
When certain users try to use that, it strips out the id=”somename” and just leave the div there. Nothing else is changed.
The comments keep eating my div tags!
I want to change some of the html on my WordPress home page. Can I do this with raw-html?
Suppose I create an entirely new page using HyperEdit or another html editor. Can I copy the source code from there and create a WordPress page by using raw_html?
Assuming you only want to change the content part of the homepage – yes. However, if you need to change things in the sidebar, header and so on, something like a custom page template would probably work better.
[...] Raw HTML Plugin for WordPress | W-Shadow.com – Permet l’insertion du code dans wordpress sans interprétation, évitant des problèmes pour le code html, javascript etc. Filed under Bookmark Tagged annuaire, intallperso, logiciel, outils, piwik, plugins, pratique, server, web, WordPress Comment (RSS) | Trackback | Permalink [...]
[...] Check Raw HTML Plugin for WordPress [...]
[...] Raw HTML: “In the end I decided to just go and write a plugin that would let me put any code or script (e.g. JavaScript) in my posts and display it to the visitor unmodified.” [...]
[...] Raw HTML Capability by Janis Elsts RawHTML lets you use any HTML or JavaScript code without WP messing it up. It also [...]
Thanks for your work on this plugin – I have it installed on WP3.0.1 and it seems to be working for me apart from WP (the insatiable beast) wrapping the commented tags:
and
which upsets the intended layout a little.
Any comments on this would be greatly appreciated.
Cheers
ah ok, no luck posting code on comments
– anyway the !–start_raw– tags get wrapped in paragraphs
Try putting the tags inline with other content, like this :
Thank you!
it’s a very useful plugin
I have a studio press them and your plg in doesn’t work
I was tensed searching for this, thanks my friend. Now html are looking good !!!