mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-20 07:04:06 +09:00
- added argument $original_post for restriction content hooks;
- fixed sanitizing issues with directly using values from inputs as HTML in JS;
This commit is contained in:
+14
-2
@@ -1,3 +1,15 @@
|
||||
function um_sanitize_value( value, el ) {
|
||||
var element = document.createElement( 'div' );
|
||||
element.innerText = value;
|
||||
var sanitized_value = element.innerHTML;
|
||||
if ( el ) {
|
||||
jQuery( el ).val( sanitized_value );
|
||||
}
|
||||
|
||||
return sanitized_value;
|
||||
}
|
||||
|
||||
|
||||
function um_init_datetimepicker() {
|
||||
jQuery('.um-datepicker:not(.picker__input)').each(function(){
|
||||
var elem = jQuery(this);
|
||||
@@ -249,7 +261,7 @@ jQuery(document).ready(function() {
|
||||
parent.find('.um-single-image-preview img').attr( 'src', '' );
|
||||
parent.find('.um-single-image-preview').hide();
|
||||
parent.find('.um-btn-auto-width').html( parent.data('upload-label') );
|
||||
parent.find('input[type=hidden]').val( 'empty_file' );
|
||||
parent.find('input[type="hidden"]').val( 'empty_file' );
|
||||
}
|
||||
};
|
||||
|
||||
@@ -684,4 +696,4 @@ jQuery(document).ready(function() {
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user