Merge pull request #949 from unindented/develop

Normalize inserted text using UNorm - Good job and thanks :)
This commit is contained in:
John McLear 2012-08-13 09:45:24 -07:00
commit 6a3457dbd7
2 changed files with 406 additions and 1 deletions

View File

@ -25,13 +25,14 @@
var _MAX_LIST_LEVEL = 8; var _MAX_LIST_LEVEL = 8;
var UNorm = require('./unorm');
var Changeset = require('./Changeset'); var Changeset = require('./Changeset');
var hooks = require('./pluginfw/hooks'); var hooks = require('./pluginfw/hooks');
var _ = require('./underscore'); var _ = require('./underscore');
function sanitizeUnicode(s) function sanitizeUnicode(s)
{ {
return s.replace(/[\uffff\ufffe\ufeff\ufdd0-\ufdef\ud800-\udfff]/g, '?'); return UNorm.nfc(s).replace(/[\uffff\ufffe\ufeff\ufdd0-\ufdef\ud800-\udfff]/g, '?');
} }
function makeContentCollector(collectStyles, browser, apool, domInterface, className2Author) function makeContentCollector(collectStyles, browser, apool, domInterface, className2Author)

404
src/static/js/unorm.js Normal file

File diff suppressed because one or more lines are too long