Make WordPress Core


Ignore:
Timestamp:
12/09/2008 02:50:28 AM (17 years ago)
Author:
azaozz
Message:

Fix external dependencies in class.wp-scripts.php, fixes #8505

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/admin-header.php

    r10086 r10135  
    3030//<![CDATA[
    3131addLoadEvent = function(func) {if (typeof jQuery != "undefined") jQuery(document).ready(func); else if (typeof wpOnload!='function'){wpOnload=func;} else {var oldonload=wpOnload; wpOnload=function(){oldonload();func();}}};
     32
     33function convertEntities(o) {
     34    var c = function(s) {
     35        if (/&[^;]+;/.test(s)) {
     36            var e = document.createElement("div");
     37            e.innerHTML = s;
     38            return !e.firstChild ? s : e.firstChild.nodeValue;
     39        }
     40        return s;
     41    }
     42
     43    if ( typeof o === 'string' )
     44        return c(o);
     45    else if ( typeof o === 'object' )
     46        for (var v in o) {
     47            if ( typeof o[v] === 'string' )
     48                o[v] = c(o[v]);
     49        }
     50    return o;
     51};
    3252//]]>
    3353</script>
Note: See TracChangeset for help on using the changeset viewer.