mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-22 08:26:16 -04:00
All escaping functions replace HTML reserved characters.
This commit is contained in:
parent
30da7357e5
commit
6e36b59a59
4 changed files with 20 additions and 5 deletions
|
@ -429,14 +429,15 @@ exports.getPadHTMLDocument = function (padId, revNum, noDocType, callback)
|
|||
|
||||
function _escapeHTML(s)
|
||||
{
|
||||
var re = /[&<>]/g;
|
||||
var re = /[&"<>]/g;
|
||||
if (!re.MAP)
|
||||
{
|
||||
// persisted across function calls!
|
||||
re.MAP = {
|
||||
'&': '&',
|
||||
'"': '"',
|
||||
'<': '<',
|
||||
'>': '>',
|
||||
'>': '>'
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue