diff --git a/changelog.md b/changelog.md index cbcfbf2..d138f61 100644 --- a/changelog.md +++ b/changelog.md @@ -684,3 +684,7 @@ No changes. Erroneous version bump. * HTML editor form fields using `trumbowyg` * Field format for HTML * Fix: Update `typeahead` front end component CSS + +## Next + +* Fix: `html` format sanitizer function diff --git a/lib/forms/sanitizers.js b/lib/forms/sanitizers.js index 24bddc1..8a8dcd6 100644 --- a/lib/forms/sanitizers.js +++ b/lib/forms/sanitizers.js @@ -34,7 +34,6 @@ exports = module.exports = { .replace(/ \n|\n /g, '\n') // remove space before/after \n .replace(/\n\n+/g, '\n') // replace double \n with single \n .replace(/(<\s?\/\s?(p|h\d)\s?>|<\s?(br|hr)\s?\/?\s?>)/g, function(tag) {return tag + '\n';}) // add line breaks after

, ,
,
- .replace(/<\/h\d>/g, '

\n') .replace(/^[ \n]|[ \n]$/g, ''); // trim space and \n off start and end }, boolean: function(val) {