<commit_before>'use strict';

var debug               = require('debug-ext')('business-process-data-forms-print')
  , normalizeOptions    = require('es5-ext/object/normalize-options')
  , ensureNaturalNumber = require('es5-ext/object/ensure-natural-number-value')
  , template            = require('es6-template-strings')
  , encode              = require('ent').encode
  , renderers           = {};

var e = function (data) {
	return data ? encode(data) : data;
};

renderers.value = function (data) {<commit_msg>Issue #1389. Only encode strings<commit_after>'use strict';

var debug               = require('debug-ext')('business-process-data-forms-print')
  , normalizeOptions    = require('es5-ext/object/normalize-options')
  , ensureNaturalNumber = require('es5-ext/object/ensure-natural-number-value')
  , isString            = require('es5-ext/string/is-string')
  , template            = require('es6-template-strings')
  , encode              = require('ent').encode
  , renderers           = {};

var e = function (data) {
	return (data && isString(data)) ? encode(data) : data;
};

renderers.value = function (data) {
{'fraction_non_alphanumeric': 0.15411868910540302, 'fraction_numerical': 0.00974313551815766, 'mean_word_length': 2.9929328621908127, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '819231', 'n_tokens_mistral': 342, 'n_tokens_neox': 334, 'n_words': 57}