Title: Raw HTML
Author: Janis Elsts
Published: <strong>2 ژانویه 2008</strong>
Last modified: 11 نوامبر 2024

---

جستجوی افزونه‌ها

![](https://s.w.org/plugins/geopattern-icon/raw-html.svg)

# Raw HTML

 توسط [Janis Elsts](https://profiles.wordpress.org/whiteshadow/)

[دانلود](https://downloads.wordpress.org/plugin/raw-html.1.6.4.zip)

 * [جزئیات](https://fa.wordpress.org/plugins/raw-html/#description)
 * [نقد و بررسی‌ها](https://fa.wordpress.org/plugins/raw-html/#reviews)
 *  [نصب](https://fa.wordpress.org/plugins/raw-html/#installation)
 * [توسعه](https://fa.wordpress.org/plugins/raw-html/#developers)

 [پشتیبانی](https://wordpress.org/support/plugin/raw-html/)

## توضیحات

Lets you disable automatic formatting like smart quotes and automatic paragraph 
creation, and use raw HTML/JS/CSS code in your posts without WordPress messing it
up.

**Features**

With this plugin, you can wrap any part of your post in [raw]…[/raw] tags to prevent
WordPress from converting newlines to HTML paragraphs, replacing apostrophes with
typographic quotes and so on. This is very useful if you need to add a CSS block
or JavaScript to your post.

RawHTML will also add new checkboxes to the “Edit Post” screen that let you disable
certain WP filters on a per-post basis. This way you can:

 * Disable wptexturize (the function that creates smart quotes and other typographic
   characters).
 * Disable automatic paragraph creation.
 * Disable image smilies.
 * Disable convert_chars (the function that converts ampersands to HTML entities
   and “fixes” some Unicode characters).

The free version only supports editing posts in the Text tab (called “HTML” in older
WordPress versions). [Get the Pro version](http://rawhtmlpro.com/?utm_source=wordpress.org&utm_medium=readme_link&utm_campaign=RawHTML%20free)
if you want to be able to switch between Text and the Visual editor without WordPress
messing up your content.

**Compatibility**

This plugin doesn’t fully support the Gutenberg editor. As of WordPress 5.0, some
Raw HTML features will only work if you use the [Classic Editor](https://wordpress.org/plugins/classic-editor/)
plugin.

**Usage**

To prevent a part of your post or page from being filtered by WordPress, switch 
to the Text/HTML editor and wrap it in `[raw]...[/raw]` or `<!--raw-->...<!--/raw--
>` tags. These two versions work exactly the same, except that the latter won’t 
be visible to your visitors even if you deactivate Raw HTML.

_Example :_

    ```
    [raw]
    This 

    is 

    a "test"!
    [/raw]
    ```

In this case, the tags will prevent WordPress from inserting paragraph breaks between“
This”, “is” and “a “test””, as well as ensure that the double quotes arround “test”
are not converted to typographic (curly) quotes.

To avoid problems, only edit posts that contain your custom code in Text/HTML mode.
If you’d like to be able to also use the Visual editor, [get the Pro version](http://rawhtmlpro.com/?utm_source=wordpress.org&utm_medium=readme_link&utm_campaign=RawHTML%20free).
It will make the code betwen [raw] tags appear as a read-only placeholder when viewed
in Visual mode, ensuring WordPress doesn’t change it.

**Combining shortcodes**

By default, shortcodes that are inside [raw] tags will not work. They will just 
show up as plain text. To enable shortcodes, add the `shortcodes=1` attribute to
the tag:

    ```
    [raw shortcodes=1]This [shortcode] will be run.[/raw]

    [raw]This [shortcode] won't work.[/raw]
    ```

**Preserving `[raw]` code in excerpts**

By default, the plugin will automatically remove any code that’s inside `[raw]...[/
raw]` tags from post excerpts. You can prevent that by adding the following line
to `wp-config.php`:

    ```
    define('RAW_HTML_KEEP_RAW_IN_EXCERPTS', true);
    ```

This will ensure that the plugin doesn’t strip `[raw]` blocks from automatically
generated excerpts.

**Notes**

Some features of Raw HTML will only work for users who have the “unfiltered_html”
capability. In a normal WordPress install that includes the Editor and Administrator
roles. In a Multisite install, only the Super Admin has this capability by default.

## نصب

To install the plugin follow these steps :

 1. Download the raw-html.zip file to your local machine.
 2. Go to ‘Plugins -> Add New -> Upload’.
 3. Upload the zip file using the provided form.
 4. Activate the plugin through the ‘Plugins’ menu in WordPress

Alternatively, you can search for “Raw HTML” in ‘Plugins -> Add New -> Search’ and
install it from there, or unzip raw-html.zip and upload the `raw-html` directory
to your `/wp-content/plugins` directory.

## سوالات متداول

### What’s the difference between the free version and the Pro version?

If you’re using the free version, switching from Text/HTML to the Visual editor 
can still mess up your code. The [Pro version](http://rawhtmlpro.com/?utm_source=wordpress.org&utm_medium=readme_link&utm_campaign=RawHTML%20free)
fixes this.

The way it works is that it replaces `[raw]...[/raw]` code with read-only placeholders
when viewed via the Visual editor, and restores the original code when you switch
to HTML or when the post is displayed your readers. This allows you to switch between
HTML and Visual modes without worrying your content will get mangled by WP.

### How can I set some of the “Disable xyz” tweaks to be “On” by default?

Open to the post editor and click the “Screen Options” button in the top-right part
of the page. A settings panel will appear. Locate the “Raw HTML defaults” section
and tick the appropriate checkboxes. Any changes you make to these settings will
only affect new and edited posts.

## نقد و بررسی‌ها

![](https://secure.gravatar.com/avatar/25c588d4254d237665f81571ea1aeab3182e28b033d963b39aced99c0252f03b?
s=60&d=retro&r=g)

### 󠀁[simple, works.](https://wordpress.org/support/topic/simple-works-43/)󠁿

 [pdwalker](https://profiles.wordpress.org/pdwalker/) 22 نوامبر 2019

Although if you have the perfectly corrected and formatted html, save it offline
in case an accidently trip through the visual editor destroys your carefully laid
out code. (or get the pro version)

![](https://secure.gravatar.com/avatar/d1507135d22bbde4570be89601ff386a6f8f37c23f180636db9766fdb4679eb9?
s=60&d=retro&r=g)

### 󠀁[То, что нужно! =)](https://wordpress.org/support/topic/%d1%82%d0%be-%d1%87%d1%82%d0%be-%d0%bd%d1%83%d0%b6%d0%bd%d0%be-7/)󠁿

 [globurs](https://profiles.wordpress.org/globurs/) 24 آوریل 2019

Спасибо! РАБОТАЕТ =) Простой плагин позволяющий без лишних танцев и приблуд избежать
автоформатирования от WordPress & TinyMCE =)

![](https://secure.gravatar.com/avatar/b31b53352850a32f59243110db5da5db36deebcdbedc198f2f8ee3de96de16e6?
s=60&d=retro&r=g)

### 󠀁[Does not work](https://wordpress.org/support/topic/does-not-work-1051/)󠁿

 [Duchex](https://profiles.wordpress.org/duchex/) 2 مارس 2019

Just installed this and has no effect when using the Wordpress Code Editor, items
between the raw tags still get reformatted by wordpress.

![](https://secure.gravatar.com/avatar/04ab7bfd144d852ec69e938a00d8711fa4adab106bdf5508d381985b7d3629f3?
s=60&d=retro&r=g)

### 󠀁[Works as advertised](https://wordpress.org/support/topic/works-as-advertised-546/)󠁿

 [elenaandmeg](https://profiles.wordpress.org/elenaandmeg/) 3 جولای 2018

Having detailed and fine control of my pages, and layouts, is important to me. Being
able to add in-line CSS and embedded style sections is just what I am looking for.
Second guessing WP Theme or interface behavior is done away with for me by using
this plugin. Thanks for this.

![](https://secure.gravatar.com/avatar/1b0fbc1e6e5f8cfd2de566f648349fe1b5f851a1b4a8044facd0ed1a37e6071c?
s=60&d=retro&r=g)

### 󠀁[EXACTLY what I needed!](https://wordpress.org/support/topic/exactly-what-i-needed-490/)󠁿

 [gwenames](https://profiles.wordpress.org/gwenames/) 19 نوامبر 2017

I’m using the Pro version and it works perfectly! Client is happy that she no longer
needs to remember to open some posts in code view only… GREAT!

![](https://secure.gravatar.com/avatar/a92b6747665d2c024fd4e6ed6d3374a3c1d41a6428970c9987cb3c69a4edd015?
s=60&d=retro&r=g)

### 󠀁[Works for me](https://wordpress.org/support/topic/works-for-me-258/)󠁿

 [bfbca](https://profiles.wordpress.org/bfbca/) 8 می 2017

Works for me, thanks!

 [ خواندن تمامی 34 نقد و بررسی‌ ](https://wordpress.org/support/plugin/raw-html/reviews/)

## توسعه دهندگان و همکاران

“Raw HTML” نرم افزار متن باز است. افراد زیر در این افزونه مشارکت کرده‌اند.

مشارکت کنندگان

 *   [ Janis Elsts ](https://profiles.wordpress.org/whiteshadow/)

[ترجمه “Raw HTML” به زبان شما.](https://translate.wordpress.org/projects/wp-plugins/raw-html)

### علاقه‌ مند به توسعه هستید؟

[Browse the code](https://plugins.trac.wordpress.org/browser/raw-html/), check out
the [SVN repository](https://plugins.svn.wordpress.org/raw-html/), or subscribe 
to the [development log](https://plugins.trac.wordpress.org/log/raw-html/) by [RSS](https://plugins.trac.wordpress.org/log/raw-html/?limit=100&mode=stop_on_copy&format=rss).

## گزارش تغییرات

#### 1.6.4

 * Improved compatibility with plugins that change or hide the WordPress version
   number.
 * Tested up to WordPress 6.1.1 and 6.2-alpha.

#### 1.6.3

 * Fixed a potential PHP warning about an expression being passed by reference.
 * Tested up to WordPress 5.5-alpha.

#### 1.6.2

 * Fixed a conflict with Jetpack that could cause the plugin to trigger a fatal 
   error during certain cron jobs.
 * Tested up to WordPress 5.3.

#### 1.6.1

 * Fixed a conflict with the “AMP Stories” plugin. This fix may also help with current
   or future conflicts with other plugins that remove the default post filters.

#### 1.6

 * Added a way to preserve `[raw]` blocks in post excerpts.
 * Enabled the “Raw HTML” metabox for custom post types.
 * Tested up to WP 5.2 (only with the Classic Editor).

#### 1.5.1

 * Added limited support for the page builder included with GoodLayers themes (e.
   g. Mediso).
 * Tested with WP 4.8.2 and 4.9-beta1.

#### 1.5

 * Added a way to run shortcodes inside [raw] tags. To enable shortcodes, add the`
   shortcodes=1` attribute to the tag. Example: `[raw shortcodes=1]some code ...[
   my-shortcode] ... other code[/raw]`.
 * Fixed a conflict with Events Calendar Pro (+ Community Events add-on). This should
   also fix conflicts with other plugins that remove default post filters like `
   wpautop`.
 * Tested with WP 4.6-beta2.

#### 1.4.16

 * Tested with WP 4.5.

#### 1.4.15

 * Tested with WP 4.2.
 * Fixed a rare “trying to get property of non-object” notice.

#### 1.4.14

 * Tested with WP 4.1 and 4.2-alpha.

#### 1.4.13

 * Tested with WP 4.0.

#### 1.4.12

 * Tested with the release version of WP 3.9.

#### 1.4.11

 * Tested up to WP 3.9-alpha.
 * Fixed a minor conflict with plugins/themes that run custom queries and then manually
   apply “the_content” filter to post content.

#### 1.4.10

 * Fixed a rare bug where all [raw]…[/raw] blocks in a post would be replaced with
   the content of the first block.

#### 1.4.9

 * Fixed a new conflict with WP-Syntax 1.0.
 * Tested with WP 3.5.1 and WP 3.6-beta1.

#### 1.4.8

 * Fixed a conflict with WP-Syntax.
 * Fixed: Prevent WordPress from wrapping each [raw]…[/raw] block in a paragraph.
   Doesn’t affect inline [raw] blocks.
 * Tested with WP 3.5-beta2.

#### 1.4.7

 * Tested with WP 3.4.1
 * Fixed the Author URI (was 404).
 * Updated the plugin description. Now it also includes short usage instructions.
 * Fixed the link to the Pro version (new site).

#### 1.4.6

 * Tested on WP 3.4 (final release).

#### 1.4.5

 * Tested on WP 3.4-alpha
 * Store per-post disable_* flags in a single post meta key instead of one key per
   flag.

#### 1.4.4

 * Fixed a minor conflict with the “Really simple Facebook Twitter share buttons”
   plugin.

#### 1.4.3

 * Changed the name to just “Raw HTML”.
 * Fixed incompatibility with SyntaxHighlighter Evolved.
 * Tested on WordPress 3.3 (beta).

#### 1.4.2

 * Tested on WordPress 3.2.1
 * Improved the checkbox layout in the plugin’s post editor widget (extra whitespace).

#### 1.4.1

 * Tested on the latest Beta version of WordPress (3.2-beta2).
 * Prefer `<!--raw-->...<!--/raw-->` over `<!--start_raw-->...<!--/end_raw-->`. 
   The old syntax will continue to work, but you’re encouraged to use either [raw]
   or `<!--raw-->` in the future as they’re more internally consistent (and shorter).

#### 1.4

 * To decrease UI clutter, post-level settings now use hidden custom fields.

#### 1.3

 * Added a new panel to the “Screen Options” box that lest you auto-enable specific
   RawHTML settings (e.g. “Disable automatic paragraphs”) for all new or updated
   posts.

#### 1.2.5

 * Fixed a conflict with the Intypo plugin
 * Fixed example code formatting in readme.txt

#### 1.2.4

 * Added an autogenerated changelog.

#### 1.2.3

 * Fix a problem where very long posts would be displayed as blank. This was caused
   by a regexp input size limitation/bug in newer versions of PHP.

#### 1.2.2

 * Fix a glitch when one [RAW]/RAW block is immediately followed by another (cause:
   greedy regexp).

#### 1.2.1

 * Change filter priorities _again_ to make it compatible with Exec-PHP (hopefully).

#### 1.2

 * Improved compatibility with other plugins (e.g. cforms II).
 * Gave the “maybe_” filters a higher priority to prevent conflicts with some plugins
   that want to insert untexturized HTML.

#### 1.1

 * New feature : disable wptexturize() and other filters on a per-post level.
 * “Official” WP 2.7 compatibility.
 * Fixed some readme.txt text

#### 1.0.5

 * Fix : regexp failing for very long posts, leading to blank pages.

#### 1.0.4

 * A tiny bugfix – changed one regexp to make quicktags perform as expected.

#### 1.0.3

 * WP 2.5.1 compatibility

#### 1.0.2

 * _There are no release notes for this version_

## اطلاعات

 *  نگارش **1.6.4**
 *  Last updated **1 سال پیش**
 *  نصب‌های فعال **10,000+**
 *  نگارش وردپرس ** 2.8 یا بالاتر **
 *  Tested up to **6.7.5**
 *  زبان
 * [English (US)](https://wordpress.org/plugins/raw-html/)
 * Tags
 * [css](https://fa.wordpress.org/plugins/tags/css/)[formatting](https://fa.wordpress.org/plugins/tags/formatting/)
   [html](https://fa.wordpress.org/plugins/tags/html/)[javascript](https://fa.wordpress.org/plugins/tags/javascript/)
   [posts](https://fa.wordpress.org/plugins/tags/posts/)
 *  [نمایش پیشرفته](https://fa.wordpress.org/plugins/raw-html/advanced/)

## امتیازها

 4.3 از 5 ستاره.

 *  [  امتیاز 23 5-ستاره     ](https://wordpress.org/support/plugin/raw-html/reviews/?filter=5)
 *  [  امتیاز 5 4-ستاره     ](https://wordpress.org/support/plugin/raw-html/reviews/?filter=4)
 *  [  امتیاز 1 3-ستاره     ](https://wordpress.org/support/plugin/raw-html/reviews/?filter=3)
 *  [  امتیاز 0 2-ستاره     ](https://wordpress.org/support/plugin/raw-html/reviews/?filter=2)
 *  [  امتیاز 4 1-ستاره     ](https://wordpress.org/support/plugin/raw-html/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/raw-html/reviews/#new-post)

[مشاهده همه بررسی‌ها](https://wordpress.org/support/plugin/raw-html/reviews/)

## مشارکت کنندگان

 *   [ Janis Elsts ](https://profiles.wordpress.org/whiteshadow/)

## پشتیبانی

چیزی برای گفتن دارید؟ نیاز به کمک دارید؟

 [مشاهده انجمن پشتیبانی](https://wordpress.org/support/plugin/raw-html/)