[wp-hackers] Cleaning up small validation errors in the admin	interface
    Harish Narayanan 
    harish.mlists at gmail.com
       
    Sun Apr 11 11:12:40 UTC 2010
    
    
  
Hello all,
I receive a few validation errors due to small things like using &
instead of & in the WordPress admin interface. In order to work
around this, I've been tracking down individual offending files and
doing silly things like the following:
Index: wp-admin/includes/media.php
===================================================================
--- wp-admin/includes/media.php	(revision 14070)
+++ wp-admin/includes/media.php	(working copy)
@@ -388,10 +388,10 @@
 	$upload_iframe_src = add_query_arg('post_id', $uploading_iframe_ID,
'media-upload.php');
 	if ( 'media' != $type )
-		$upload_iframe_src = add_query_arg('type', $type, $upload_iframe_src);
+		$upload_iframe_src = add_query_arg('amp;type', $type,
$upload_iframe_src);
 	$upload_iframe_src = apply_filters($type . '_upload_iframe_src',
$upload_iframe_src);
-	return add_query_arg('TB_iframe', true, $upload_iframe_src);
+	return add_query_arg('amp;TB_iframe', true, $upload_iframe_src);
 }
 /**
While this sort of thing works, it is not very elegant. Could someone
tell me what I should be touching (even lower than add_query_arg(), if
possible) to perform such transformations uniformly across the admin
(not frontend theme) interface?
Thanks,
Harish
    
    
More information about the wp-hackers
mailing list