<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>README.md</filename>
    </added>
    <added>
      <filename>doc/syntax.org</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -3,9 +3,25 @@ require 'pp'
 
 $LOAD_PATH.unshift File.dirname(__FILE__)
 
+module Org
+  module_function
+
+  def escape_html(string)
+    string.to_s.gsub(&quot;&amp;&quot;, &quot;&amp;amp;&quot;).
+      gsub(&quot;&lt;&quot;, &quot;&amp;lt;&quot;).
+      gsub(&quot;&gt;&quot;, &quot;&amp;gt;&quot;).
+      gsub(&quot;'&quot;, &quot;&amp;#39;&quot;).
+      gsub('&quot;', &quot;&amp;quot;&quot;)
+  end
+end
+
 require 'org/stringscanner'
 require 'org/markup'
 require 'org/state'
 require 'org/scope'
 require 'org/token'
 require 'org/rule'
+
+require 'org/scope/org_mode'
+require 'org/to/html'
+require 'org/to/toc'</diff>
      <filename>lib/org.rb</filename>
    </modified>
    <modified>
      <diff>@@ -20,7 +20,7 @@ module Org
     end
 
     def html_text
-      Rack::Utils.escape_html(values.join)
+      Org.escape_html(values.join)
     end
 
     # unify toc_id somwhere?
@@ -74,10 +74,10 @@ module Org
 
     def build_tag(name, attr = {}, text = [])
       @out &lt;&lt; &quot;&lt;#{name}&quot;
-      @out &lt;&lt; attr.map{|k,v| %[ #{k}=&quot;#{escape_entities(v)}&quot;] }.join
+      @out &lt;&lt; attr.map{|k,v| %[ #{k}=&quot;#{Org.escape_html(v)}&quot;] }.join
       if text != [] or block_given?
         @out &lt;&lt; &quot;&gt;&quot;
-        @out &lt;&lt; escape_entities([text].join)
+        @out &lt;&lt; Org.escape_html([text].join)
         if block_given?
           text = yield
           @out &lt;&lt; text.to_str if text != @out and text.respond_to?(:to_str)
@@ -87,13 +87,5 @@ module Org
         @out &lt;&lt; ' /&gt;'
       end
     end
-
-    def escape_entities(s)
-      s.to_s.gsub(/&amp;/, '&amp;amp;').
-        gsub(/&quot;/, '&amp;quot;').
-        gsub(/'/, '&amp;apos;').
-        gsub(/&lt;/, '&amp;lt;').
-        gsub(/&gt;/, '&amp;gt;')
-    end
   end
 end</diff>
      <filename>lib/org/to/html.rb</filename>
    </modified>
    <modified>
      <diff>@@ -5,6 +5,7 @@ require 'org/to/html'
 module Org
   class Token
     include ToHtml
+    include ToToc
   end
 end
 
@@ -20,11 +21,11 @@ describe Org::Markup do
   end
 
   should 'markup headers' do
-    t(&quot;* header&quot;).should == '&lt;h1&gt;header&lt;/h1&gt;'
-    t(&quot;** header&quot;).should == '&lt;h2&gt;header&lt;/h2&gt;'
-    t(&quot;*** header&quot;).should == '&lt;h3&gt;header&lt;/h3&gt;'
-    t(&quot;**** header&quot;).should == '&lt;h4&gt;header&lt;/h4&gt;'
-    t(&quot;***** header&quot;).should == '&lt;h5&gt;header&lt;/h5&gt;'
+    t(&quot;* header&quot;     ).should == '&lt;h1&gt;header&lt;/h1&gt;'
+    t(&quot;** header&quot;    ).should == '&lt;h2&gt;header&lt;/h2&gt;'
+    t(&quot;*** header&quot;   ).should == '&lt;h3&gt;header&lt;/h3&gt;'
+    t(&quot;**** header&quot;  ).should == '&lt;h4&gt;header&lt;/h4&gt;'
+    t(&quot;***** header&quot; ).should == '&lt;h5&gt;header&lt;/h5&gt;'
     t(&quot;****** header&quot;).should == '&lt;h6&gt;header&lt;/h6&gt;'
   end
 </diff>
      <filename>spec/org.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>3b1f2d200ce4ff9d7c5081613bcdcc57f479dcbc</id>
    </parent>
  </parents>
  <author>
    <name>Michael Fellinger</name>
    <email>m.fellinger@gmail.com</email>
  </author>
  <url>http://github.com/manveru/org/commit/ca4d900181a50376c2fddb771c6cd97d56dc8140</url>
  <id>ca4d900181a50376c2fddb771c6cd97d56dc8140</id>
  <committed-date>2009-01-01T06:55:47-08:00</committed-date>
  <authored-date>2009-01-01T06:55:47-08:00</authored-date>
  <message>Org for rakki</message>
  <tree>4bd0fc4023540cde976d6131098e971bb407ea8c</tree>
  <committer>
    <name>Michael Fellinger</name>
    <email>m.fellinger@gmail.com</email>
  </committer>
</commit>
