chore: improve workflow names and fix CSS indentation consistency (#18)
* fix: resolve plugin class loading reliability issues * fix: address CodeRabbit XSS and accessibility findings from PR #18 - admin/js/admin-scripts.js: replace HTML string interpolation in showNotice with DOM API construction and .text() to prevent XSS; whitelist type values - admin/js/update-source-selector.js: replace .html(message) with .text(message) in showMessage to prevent XSS from AJAX response content - admin/templates/modal.php: add role=dialog, aria-modal=true, aria-labelledby for screen reader semantics; replace <span> close control with <button> for keyboard operability and proper ARIA role
This commit is contained in:
@@ -153,8 +153,8 @@
|
||||
showMessage: function (type, message) {
|
||||
const $message = this.$modal.find( '.wpst-modal-message' );
|
||||
|
||||
// Set message content and type.
|
||||
$message.html( message ).removeClass( 'success error' ).addClass( type ).show();
|
||||
// Set message as plain text to prevent XSS, then apply type class.
|
||||
$message.text( message ).removeClass( 'success error' ).addClass( type ).show();
|
||||
|
||||
// Hide message after a delay for success messages.
|
||||
if (type === 'success') {
|
||||
|
||||
Reference in New Issue
Block a user