mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-05-09 16:35:01 -04:00
Export DOMInterface.
This commit is contained in:
parent
b023eb1fe5
commit
cbd300101d
1 changed files with 37 additions and 34 deletions
|
@ -30,16 +30,7 @@ var Changeset = require('./Changeset');
|
|||
var hooks = require('./pluginfw/hooks');
|
||||
var _ = require('./underscore');
|
||||
|
||||
function sanitizeUnicode(s)
|
||||
{
|
||||
return UNorm.nfc(s).replace(/[\uffff\ufffe\ufeff\ufdd0-\ufdef\ud800-\udfff]/g, '?');
|
||||
}
|
||||
|
||||
function makeContentCollector(collectStyles, browser, apool, domInterface, className2Author)
|
||||
{
|
||||
browser = browser || {};
|
||||
|
||||
var dom = domInterface || {
|
||||
var DOMInterface = {
|
||||
isNodeText: function(n)
|
||||
{
|
||||
return (n.nodeType == 3);
|
||||
|
@ -72,7 +63,18 @@ function makeContentCollector(collectStyles, browser, apool, domInterface, class
|
|||
{
|
||||
return n.innerHTML;
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
function sanitizeUnicode(s)
|
||||
{
|
||||
return UNorm.nfc(s).replace(/[\uffff\ufffe\ufeff\ufdd0-\ufdef\ud800-\udfff]/g, '?');
|
||||
}
|
||||
|
||||
function makeContentCollector(collectStyles, browser, apool, domInterface, className2Author)
|
||||
{
|
||||
browser = browser || {};
|
||||
|
||||
var dom = domInterface || DOMInterface;
|
||||
|
||||
var _blockElems = {
|
||||
"div": 1,
|
||||
|
@ -703,5 +705,6 @@ function makeContentCollector(collectStyles, browser, apool, domInterface, class
|
|||
return cc;
|
||||
}
|
||||
|
||||
exports.DOMInterface = DOMInterface;
|
||||
exports.sanitizeUnicode = sanitizeUnicode;
|
||||
exports.makeContentCollector = makeContentCollector;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue