diff --git a/openlibrary/plugins/openlibrary/js/jsdef.js b/openlibrary/plugins/openlibrary/js/jsdef.js index 5711e21618a..8709a94f147 100644 --- a/openlibrary/plugins/openlibrary/js/jsdef.js +++ b/openlibrary/plugins/openlibrary/js/jsdef.js @@ -135,7 +135,13 @@ function websafe(value) { /* eslint-disable no-unused-vars */ // used in websafe function +/** + * Quote a string + * @param {string|number} text to quote + */ function htmlquote(text) { + // This code exists for compatibility with template.js + text = String(text); text = text.replace("&", "&"); // Must be done first! text = text.replace("<", "<"); text = text.replace(">", ">");