mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-03-30 18:24:31 +00:00
Filter HTML entities when inserting strings with js, includes patch by nbachiyski, fixes #8254
git-svn-id: https://develop.svn.wordpress.org/trunk@9809 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -28,6 +28,20 @@ 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 p = document.createElement('p');
|
||||
var c = function(s) { p.innerHTML = s; return p.innerHTML; }
|
||||
|
||||
if ( typeof o === 'object' )
|
||||
for (var v in o)
|
||||
o[v] = c(o[v]);
|
||||
|
||||
else if ( typeof o === 'string' )
|
||||
return c(o);
|
||||
|
||||
p = null;
|
||||
};
|
||||
//]]>
|
||||
</script>
|
||||
<?php
|
||||
|
||||
Reference in New Issue
Block a user