Changeset 9836 for trunk/wp-admin/admin-header.php
- Timestamp:
- 11/21/2008 07:36:57 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/admin-header.php
r9809 r9836 31 31 32 32 function convertEntities(o) { 33 var p = document.createElement('p'); 34 var c = function(s) { p.innerHTML = s; return p.innerHTML; } 33 var c = function(s) { 34 if (/&[^;]+;/.test(s)) { 35 var e = document.createElement("div"); 36 e.innerHTML = s; 37 return !e.firstChild ? s : e.firstChild.nodeValue; 38 } 39 return s; 40 } 35 41 36 if ( typeof o === 'object' ) 42 if ( typeof o === 'object' ) { 37 43 for (var v in o) 38 44 o[v] = c(o[v]); 39 40 else if ( typeof o === 'string' )45 return o; 46 } else if ( typeof o === 'string' ) 41 47 return c(o); 42 43 p = null;44 48 }; 45 49 //]]>
Note: See TracChangeset
for help on using the changeset viewer.