title: Sanitize gem (and Loofah) removing text before leading colon inside tags
body: <p>Ran into some strange behavior with both Loofah and Sanitize while trying to clean up some html fragments when I noticed that times like "6:30pm" were turning into "30pm".</p>
  
  <p>Did some investigation and found the following:</p>
  
  <pre><code>Loofah.scrub_fragment("&lt;span&gt;asdfasdf 6:30 pm&lt;/span&gt;", :strip).to_html
  #=&gt; "&lt;span&gt;asdfasdf 30 pm&lt;/span&gt;"
  Loofah.scrub_fragment("6:30 pm", :strip).to_html
  #=&gt; "6:30 pm"
  Loofah.scrub_fragment("&lt;foo&gt;asdfasdf 6&amp;#58;30 pm&lt;/foo&gt;", :strip).to_html
  #=&gt; "asdfasdf 6:30 pm"
  Loofah.scrub_fragment("bar:30 pm", :strip).to_html
  #=&gt; "bar:30 pm"
  Loofah.scrub_fragment("&lt;span&gt;bar:30 pm&lt;/span&gt;", :strip).to_html
  #=&gt; "&lt;span&gt;30 pm&lt;/span&gt;"
  Loofah.scrub_fragment("&lt;span&gt;bar: asdfasdfadsf pm&lt;/span&gt;", :strip).to_html
  #=&gt; "&lt;span&gt;bar: asdfasdfadsf pm&lt;/span&gt;"
  </code></pre>
  
  <p>This is the case with all the variants of Loofah (:prune etc) and of Sanitize, so I'm assuming it's a matter of code common to both of them. Is there anything special I need to be doing to escape colons in the code before sanitizing?</p>
  
  <p><strong>Edit 1</strong>
  I realize I neglected to mention that I'm using jruby ( jruby 1.7.0 (1.9.3p203) ).  I'm trying to sort out if perhaps there may be an issue in nokogiri (Which underlies both of these gems?)</p>
  
  <p><strong>Edit 2</strong>
  With some further digging, it looks like MIGHT be an issue in Nokogiri on Jruby (I'm on version 1.5.5 of nokagiri, for what that's worth).  I checked out nokogiri's fragment parser on Jruby and on Ruby 1.9.3:</p>
  
  <p>Jruby 1.7.0: <strong>Unexpected results</strong></p>
  
  <pre><code>doc = Nokogiri::HTML.fragment("&lt;span&gt;3:30pm&lt;/span&gt;")
  =&gt; #(DocumentFragment:0x5fbc {
    name = "#document-fragment",
    children = [
      #(Element:0x5fc0 { name = "span", children = [ #(Text "30pm")] })]
    })
  </code></pre>
  
  <p>Ruby 1.9.3: <strong>Expected results</strong></p>
  
  <pre><code> doc = Nokogiri::HTML.fragment("&lt;span&gt;3:30pm&lt;/span&gt;")
   =&gt; #(DocumentFragment:0x3fc4b102055c {
     name = "#document-fragment",
    children = [
      #(Element:0x3fc4b101fff8 {
        name = "span",
        children = [ #(Text "3:30pm")]
        })]
    })
  </code></pre>
  
  <p>Will try to keep digging but any suggestions are welcome.</p>