diff --git a/main/webapp/modules/core/langs/translation-en.json b/main/webapp/modules/core/langs/translation-en.json index 95cf95ff5..79c8ba7ba 100644 --- a/main/webapp/modules/core/langs/translation-en.json +++ b/main/webapp/modules/core/langs/translation-en.json @@ -604,6 +604,7 @@ "core-views/trim-all": "Trim leading and trailing whitespace", "core-views/collapse-white": "Collapse consecutive whitespace", "core-views/unescape-html": "Unescape HTML entities", + "core-views/replace-smartquotes": "Replace Smart quotes with ascii", "core-views/titlecase": "To titlecase", "core-views/uppercase": "To uppercase", "core-views/lowercase": "To lowercase", diff --git a/main/webapp/modules/core/scripts/views/data-table/menu-edit-cells.js b/main/webapp/modules/core/scripts/views/data-table/menu-edit-cells.js index 469f89443..3bfb5bb6e 100644 --- a/main/webapp/modules/core/scripts/views/data-table/menu-edit-cells.js +++ b/main/webapp/modules/core/scripts/views/data-table/menu-edit-cells.js @@ -384,6 +384,11 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) { label: $.i18n('core-views/unescape-html'), click: function() { doTextTransform("value.unescape('html')", "keep-original", true, 10); } }, + { + id: "core/replace-smartquotes", + label: $.i18n('core-views/replace-smartquotes'), + click: function() { doTextTransform("value.replace(/[\u2018\u2019\u201A\u201B\u2039\u203A\u201A]/,\"\\\'\").replace(/[\u201C\u201D\u00AB\u00BB\u201E]/,\"\\\"\")", "keep-original", false, ""); } + }, {}, { id: "core/to-titlecase",