protected DocumentFragment parseFragmentImpl(String source) throws GadgetException {
try {
Document htmlDoc = documentProvider.createDocument(null, null, null);
// Workaround for error check failure adding text node to entity ref as a child
htmlDoc.setStrictErrorChecking(false);
DocumentFragment fragment = htmlDoc.createDocumentFragment();
InputSource input = new InputSource(new StringReader(source));
DOMFragmentParser parser = new DOMFragmentParser();
parser.setProperty("http://cyberneko.org/html/properties/names/elems", "default");
parser.setFeature("http://cyberneko.org/html/features/document-fragment", true);
parser.setProperty("http://cyberneko.org/html/properties/names/attrs", "no-change");