Changeset 10086
- Timestamp:
- 12/06/2008 09:54:24 AM (17 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
-
wp-admin/admin-header.php (modified) (1 diff)
-
wp-includes/class.wp-scripts.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/admin-header.php
r10081 r10086 30 30 //<![CDATA[ 31 31 addLoadEvent = 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 33 function 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 };52 32 //]]> 53 33 </script> -
trunk/wp-includes/class.wp-scripts.php
r9809 r10086 45 45 echo "<script type='text/javascript'>\n"; 46 46 echo "/* <![CDATA[ */\n"; 47 echo "function convertEntities(o) {\n"; 48 echo " var c = function(s) {\n"; 49 echo " if (/&[^;]+;/.test(s)) {\n"; 50 echo " var e = document.createElement('div');\n"; 51 echo " e.innerHTML = s;\n"; 52 echo " return !e.firstChild ? s : e.firstChild.nodeValue;\n"; 53 echo " }\n"; 54 echo " return s;\n"; 55 echo " }\n"; 56 echo " if ( typeof o === 'string' ) {\n"; 57 echo " return c(o);\n"; 58 echo " } else if ( typeof o === 'object' ) {\n"; 59 echo " for (var v in o) {\n"; 60 echo " if ( typeof o[v] === 'string' )\n"; 61 echo " o[v] = c(o[v]);\n"; 62 echo " }\n"; 63 echo " }\n"; 64 echo " return o;\n"; 65 echo "};\n"; 47 66 echo "\t$object_name = {\n"; 48 67 $eol = '';
Note: See TracChangeset
for help on using the changeset viewer.