Why async-upload error message is being escaped?
-
hi, I’ve build a plugin that allows user to replace attachment file. I’ve hooked to ‘wp_handle_upload_prefilter’ filter in which I’m checking extension of uploaded file and currently uploading file and if they are diffrent I’m setting my custom error message like this:
$file['error'] = '<strong>error</strong>';
but in admin panel error message shows
<strong>error</strong>
rather that error. After searching the core I found that error message is passed through esc_html() function at line 92 in …wp-admin/async-upload.php:esc_html($id->get_error_message()) . '</div>';
Does anybody know what’s the reason for escaping error message?
- The topic ‘Why async-upload error message is being escaped?’ is closed to new replies.