Move the l10n helper function into a seperate js file so we can always output it first.

Fixes #15124.

git-svn-id: https://develop.svn.wordpress.org/trunk@16282 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Peter Westwood
2010-11-10 21:53:30 +00:00
parent e6d62aeb48
commit 6b1be702c4
6 changed files with 34 additions and 24 deletions
-22
View File
@@ -1,26 +1,4 @@
// utility functions
function convertEntities(o) {
var c, v;
c = function(s) {
if (/&[^;]+;/.test(s)) {
var e = document.createElement("div");
e.innerHTML = s;
return !e.firstChild ? s : e.firstChild.nodeValue;
}
return s;
}
if ( typeof o === 'string' ) {
return c(o);
} else if ( typeof o === 'object' ) {
for (v in o) {
if ( typeof o[v] === 'string' ) {
o[v] = c(o[v]);
}
}
}
return o;
}
var wpCookies = {
// The following functions are from Cookie.js class in TinyMCE, Moxiecode, used under LGPL.