diff --git a/js/test.js b/js/test.js
index 3f24a2e..c1eec7e 100644
--- a/js/test.js
+++ b/js/test.js
@@ -595,6 +595,40 @@ describe('Model', function () {
);
});
+ describe('getFormatDefault', function () {
+ before(function () {
+ $.PrivateBin.Model.reset();
+ cleanup();
+ });
+
+ jsc.property(
+ 'returns the contents of the element with id "pasteFormatter"',
+ 'array asciinestring',
+ 'string',
+ 'small nat',
+ function (keys, value, key) {
+ keys = keys.map($.PrivateBin.Helper.htmlEntities);
+ value = $.PrivateBin.Helper.htmlEntities(value);
+ var content = keys.length > key ? keys[key] : (keys.length > 0 ? keys[0] : 'null'),
+ contents = '';
+ $('body').html(contents);
+ var result = $.PrivateBin.Helper.htmlEntities(
+ $.PrivateBin.Model.getFormatDefault()
+ );
+ $.PrivateBin.Model.reset();
+ return content === result;
+ }
+ );
+ });
+
describe('getPasteId', function () {
before(function () {
$.PrivateBin.Model.reset();
diff --git a/tpl/bootstrap.php b/tpl/bootstrap.php
index 6fc01bd..8933ea6 100644
--- a/tpl/bootstrap.php
+++ b/tpl/bootstrap.php
@@ -230,6 +230,17 @@ if ($isCpct):
?>