diff --git a/js/functions.js b/js/functions.js index 71c11a7afb..b27dcc46b1 100644 --- a/js/functions.js +++ b/js/functions.js @@ -3374,3 +3374,15 @@ function PMA_clearSelection() { if(sel.removeAllRanges) sel.removeAllRanges(); } } + +/** + * HTML escaping + */ +function escapeHtml(unsafe) { + return unsafe + .replace(/&/g, "&") + .replace(//g, ">") + .replace(/"/g, """) + .replace(/'/g, "'"); +}