diff --git a/src/hspec/XmlTypesContentSpec.hs b/src/hspec/XmlTypesContentSpec.hs
--- a/src/hspec/XmlTypesContentSpec.hs
+++ b/src/hspec/XmlTypesContentSpec.hs
@@ -17,9 +17,19 @@
 spec :: Spec
 spec = do
   describe "textNodes" do
+    it "Properly encodes a control character" do
+      let text = "a&b"
+      XmlTypesContent.textContents text
+        `shouldBe` [ContentText "a", ContentEntity "amp", ContentText "b"]
+
+    it "Properly encodes an undefined character" do
+      let text = "a\64976b"
+      XmlTypesContent.textContents text
+        `shouldBe` [ContentText "a", ContentEntity "#64976", ContentText "b"]
+
     prop "Produces nodes that decode to the source" do
       -- For some reason xml-conduit remaps '\r' to '\n', so we simply work around that.
-      text <- suchThat arbitrary (not . elem '\r' . Text.unpack)
+      text <- Text.pack <$> suchThat arbitrary (not . elem '\r')
       pure case extractTextContentFromXml (textXml text) of
         Right decodedText ->
           if decodedText == text
diff --git a/src/library/XmlTypesContent.hs b/src/library/XmlTypesContent.hs
--- a/src/library/XmlTypesContent.hs
+++ b/src/library/XmlTypesContent.hs
@@ -8,7 +8,6 @@
 import Data.Text (Text)
 import qualified Data.Text as Text
 import Data.XML.Types
-import qualified TextBuilderDev
 import Prelude
 
 -- |
@@ -41,7 +40,7 @@
 
 codepointDecimalEntityText :: Int -> Text
 codepointDecimalEntityText codepoint =
-  TextBuilderDev.fromTextBuilder ("#" <> TextBuilderDev.unsignedDecimal codepoint)
+  Text.pack ('#' : show codepoint)
 
 charNeedsNoEscaping :: Char -> Bool
 charNeedsNoEscaping = codepointNeedsNoEscaping . ord
diff --git a/xml-types-content.cabal b/xml-types-content.cabal
--- a/xml-types-content.cabal
+++ b/xml-types-content.cabal
@@ -1,6 +1,6 @@
 cabal-version: 3.0
 name: xml-types-content
-version: 0.0.1
+version: 0.0.1.1
 synopsis: Utilities for dealing with Content-values of "xml-types"
 description:
   The `Content` type in "xml-types" is tricky and naive usage of it can lead to bugs.
@@ -46,7 +46,6 @@
   build-depends:
     base >=4.13 && <5,
     text >=1.2 && <3,
-    text-builder-dev ^>=0.3.9,
     xml-types ^>=0.3.8,
 
 test-suite hspec
