Merge pull request #66 from sijad/form-xss

Fix self xss in contact us form
This commit is contained in:
David Miller 2017-01-23 17:38:01 -05:00 committed by GitHub
commit 6b3f35d978

View File

@ -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'>&times;") $('#success > .alert-danger').html("<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;")
.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");