Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The button replacement code contains '<" and "/" in a string which causes a validation warning. I don't think it should but there is a simple fix using PHP to raw_url_encode the message and then have JavaScript escape it.
hide_submit.module line 301
$operation = (variable_get('hide_submit_script_mode', HIDE_SUBMIT_MODE_HIDE) == HIDE_SUBMIT_MODE_HIDE)
? "$(this).siblings('input:submit').hide(); $(this).hide(); $('$message').insertAfter(this); "
: "$(this).siblings('input:submit').attr('disabled', true); $(this).attr('disabled', true);";
Changed to
$message = rawurlencode($message);
$operation = (variable_get('hide_submit_script_mode', HIDE_SUBMIT_MODE_HIDE) == HIDE_SUBMIT_MODE_HIDE)
? "$(this).siblings('input:submit').hide(); $(this).hide(); $(unescape('$message')).insertAfter(this); "
: "$(this).siblings('input:submit').attr('disabled', true); $(this).attr('disabled', true);";
This is tested and working on my site.
Comments
Comment #1
Optalgin CreditAttribution: Optalgin commentedThanks,
I'll commit this soon
Comment #2
Optalgin CreditAttribution: Optalgin commentedI moved the script to .js file - instead of ugly script generation
This should fix this issue as well
Please check the latest 6.x-1.x-dev release
New package should be ready soon (verify date - jan-2010)
Comment #3
Optalgin CreditAttribution: Optalgin commented