Permalink
Browse files

update to enable utf 8 encoding

  • Loading branch information...
1 parent 04d1de3 commit fdffc92d3db0c077af09882215ae7be67e6238a9 @twilson63 committed Jun 2, 2011
Showing with 14 additions and 13 deletions.
  1. +0 −1 .bundle/config
  2. +12 −12 README.md
  3. +2 −0 html2haml.rb
View
@@ -1,3 +1,2 @@
---
-BUNDLE_DISABLE_SHARED_GEMS: "1"
BUNDLE_WITHOUT: ""
View
@@ -6,23 +6,23 @@ html 2 haml.
It is currently using haml 3.1.1!
## Features
-
+
* html text to haml text
-
+
Copy your html in the html text area and click on convert
and html2haml will convert it to haml in the text box below.
-
+
* url to haml
Enter a url to a web site and click submit
html2haml will download the page and convert it to haml
in the haml text area below
-
+
* Now you can use json to do your conversions
- # post {'page': { 'html': '<h1>Hello World</h1>' }}
- # and receive {'page': { 'html': '<h1>Hello World</h1>', 'haml': '%h1 Hello World' }}
-
+post {'page': { 'html': '<h1>Hello World</h1>' }}
+and receive {'page': { 'html': '<h1>Hello World</h1>', 'haml': '%h1 Hello World' }}
+
## Requirements for Development
@@ -32,15 +32,15 @@ It is currently using haml 3.1.1!
## Development
git clone git://github.com/twilson63/html2haml.git
-
+
bundle install
-
+
# run tests
rake
-
+
# run application
rackup
-
+
# open browser to http://localhost:9292
## Having problems
@@ -78,4 +78,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
+THE SOFTWARE.
View
@@ -6,6 +6,8 @@
require "open-uri"
require "crack"
+Encoding.default_internal = Encoding.default_external = "UTF-8"
+
helpers do
include Rack::Utils
alias_method :h, :escape_html

0 comments on commit fdffc92

Please sign in to comment.