Changeset 133

Show
Ignore:
Timestamp:
01/20/2007 09:08:47 (22 months ago)
Author:
jgarber
Message:

Improved regexp in incoming_entities. Closes #4.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/lib/redcloth/base.rb

    r132 r133  
    512512        ## implying an incoming html entity, to be skipped 
    513513 
    514         text.gsub!( /&(?![#a-z0-9]+;)/i, "x%x%" ) 
     514        text.gsub!( /&(?!(?:[a-zA-Z0-9]+|\#[0-9]+|\#x[0-9a-fA-F]+);)/i, "x%x%" ) 
    515515    end 
    516516