mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-03-24 07:14:28 +00:00
Move convertEntities js function into the BackPress scriptloader. Fixes #8505 props sambauers.
git-svn-id: https://develop.svn.wordpress.org/trunk@10086 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -29,26 +29,6 @@ wp_admin_css( 'css/ie' );
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
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();}}};
|
||||
|
||||
function convertEntities(o) {
|
||||
var 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 (var v in o) {
|
||||
if ( typeof o[v] === 'string' )
|
||||
o[v] = c(o[v]);
|
||||
}
|
||||
return o;
|
||||
};
|
||||
//]]>
|
||||
</script>
|
||||
<?php
|
||||
|
||||
Reference in New Issue
Block a user