Class: Redcarpet::Render::Safe

### Home Classes Methods

### In Files

- lib/redcarpet.rb

### Parent

HTML

### Methods

- ::new
- #block_code

### Class/Module Index

Quicksearch

- Redcarpet
- Redcarpet::CLI
- Redcarpet::Markdown
- Redcarpet::Render
- Redcarpet::Render::ManPage
- Redcarpet::Render::Safe
- Redcarpet::Render::SmartyHTML
- Redcarpet::Render::SmartyPants
- Redcarpet::Render::StripDown
- Redcarpet::Render::XHTML
- Object
- RedcarpetCompat

No matching classes.

# Redcarpet::Render::Safe

A renderer object you can use to deal with users' input. It enables `escape_html` and `safe_links_only` by default.

The `block_code` callback is also overriden not to include the lang's class as the user can basically specify anything with the vanilla one.

### Public Class Methods

new(extensions = {}) click to toggle source

    # File lib/redcarpet.rb, line 32
    def initialize(extensions = {})
      super({
        escape_html: true,
        safe_links_only: true
      }.merge(extensions))
    end

### Public Instance Methods

block_code(code, lang) click to toggle source

    # File lib/redcarpet.rb, line 39
    def block_code(code, lang)
      "<pre>"            "<code>#{html_escape(code)}</code>"          "</pre>"
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.