diff --git a/src/Text/XHtmlCombinators/Escape.hs b/src/Text/XHtmlCombinators/Escape.hs
--- a/src/Text/XHtmlCombinators/Escape.hs
+++ b/src/Text/XHtmlCombinators/Escape.hs
@@ -46,7 +46,7 @@
     encode c 
       | Just ent <- I.lookup (fromEnum c) entityMap 
                   = T.concat ["&", ent, ";"]
-      | otherwise = T.pack $ concat ["&#", hex c , ";"]
+      | otherwise = T.pack $ concat ["&#x", hex c , ";"]
     
 -- | Escaping text intended for places where scripts can be used 
 escapeJavaScript :: Text -> Text
diff --git a/src/Text/XHtmlCombinators/Render.hs b/src/Text/XHtmlCombinators/Render.hs
--- a/src/Text/XHtmlCombinators/Render.hs
+++ b/src/Text/XHtmlCombinators/Render.hs
@@ -12,7 +12,7 @@
     ) where
 
 import Control.Applicative hiding (empty)
-import Data.Foldable
+import Data.Foldable hiding (elem)
 import Data.Functor.Identity
 import qualified Data.Sequence as Seq
 
@@ -37,12 +37,29 @@
 
 renderNode (TextNode t) = t
 renderNode (Node name rattrs attrs c)
+    | name `elem` validEmptyElements && Seq.null c = T.concat [lt, name, a, b, " />"]
     | Seq.null c = T.concat [lt, name, a, b, gt, lts, name, gt]
     | otherwise = T.concat 
         [lt, name, a, b, gt, fold (fmap renderNode c), lts, name, gt]
     where a = renderAttrs rattrs
           b = renderAttrs attrs
 
+validEmptyElements :: [Text]
+validEmptyElements = [ "area"
+                     , "base"
+		     , "basefont"
+		     , "br"
+                     , "col"
+                     , "frame"
+		     , "hr"
+		     , "img"
+		     , "input"
+                     , "isindex"
+                     , "link"
+		     , "meta"
+		     , "param"
+		     ]
+
 -- | Quickly render a xhtml page to text.
 -- 
 -- This function will render the entire page on a single line, which
@@ -61,6 +78,9 @@
 -- 
 -- Also, 'Text.XML.Light' will render the document as proper XML, which is 
 -- fine only if you're not trying to pass of your page as text/html.
+--
+-- It also has a tendency to turn escaped characters back into their unescaped
+-- counterparts, so it's probably best to only use this for debugging.
 renderPrettyT :: (Functor t, Monad t, Content c) => XHtmlT t c -> t Text
 renderPrettyT page = do
     content <- renderT page
diff --git a/xhtml-combinators.cabal b/xhtml-combinators.cabal
--- a/xhtml-combinators.cabal
+++ b/xhtml-combinators.cabal
@@ -1,5 +1,5 @@
 name: xhtml-combinators
-version: 0.2.1
+version: 0.2.2
 cabal-version: >= 1.2.3
 synopsis: Fast and easy to use XHTML combinators.
 description: 
