     }
 }
 
-extension Data {
+public extension Data {
     
-    func encodeHTMLEntities(quoteCharacter: HTMLQuoteCharacter = .doubleQuote) -> Data? {
+    public func encodeHTMLEntities(quoteCharacter: HTMLQuoteCharacter = .doubleQuote) -> Data? {
         let bufferGrowthFactor = 1.4
         let inputLength = self.count
         var outputLength = Int(Double(inputLength) * bufferGrowthFactor)

import Foundation
import libxml2

enum HTMLQuoteCharacter: Character {
    case none = "\0"
    case singleQuote = "'"
    case doubleQuote = "\""

    }
}

public extension String {
    public func encodeHTMLEntities(quoteCharacter: HTMLQuoteCharacter = .doubleQuote) -> String? {
        guard let utf8Data = self.data(using: .utf8) else {
            return nil
        }
