fix up self xss in contact form JS
This commit is contained in:
parent
ba99283be0
commit
674f0a3fda
@ -47,7 +47,7 @@ $(function() {
|
|||||||
$('#success').html("<div class='alert alert-danger'>");
|
$('#success').html("<div class='alert alert-danger'>");
|
||||||
$('#success > .alert-danger').html("<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>×")
|
$('#success > .alert-danger').html("<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>×")
|
||||||
.append("</button>");
|
.append("</button>");
|
||||||
$('#success > .alert-danger').append("<strong>Sorry " + firstName + ", it seems that my mail server is not responding. Please try again later!");
|
$('#success > .alert-danger').append($("<strong>").text("Sorry " + firstName + ", it seems that my mail server is not responding. Please try again later!"));
|
||||||
$('#success > .alert-danger').append('</div>');
|
$('#success > .alert-danger').append('</div>');
|
||||||
//clear all fields
|
//clear all fields
|
||||||
$('#contactForm').trigger("reset");
|
$('#contactForm').trigger("reset");
|
||||||
@ -69,4 +69,4 @@ $(function() {
|
|||||||
/*When clicking on Full hide fail/success boxes */
|
/*When clicking on Full hide fail/success boxes */
|
||||||
$('#name').focus(function() {
|
$('#name').focus(function() {
|
||||||
$('#success').html('');
|
$('#success').html('');
|
||||||
});
|
});
|
@ -23,4 +23,4 @@ $headers = "From: noreply@yourdomain.com\n"; // This is the email address the ge
|
|||||||
$headers .= "Reply-To: $email_address";
|
$headers .= "Reply-To: $email_address";
|
||||||
mail($to,$email_subject,$email_body,$headers);
|
mail($to,$email_subject,$email_body,$headers);
|
||||||
return true;
|
return true;
|
||||||
?>
|
?>
|
Loading…
Reference in New Issue
Block a user