Skip to content
This repository has been archived by the owner on Jul 24, 2023. It is now read-only.

Commit

Permalink
feat(ContactForm): disable over sanitization
Browse files Browse the repository at this point in the history
  • Loading branch information
CanRau committed Sep 20, 2020
1 parent 8e51455 commit 63ca567
Showing 1 changed file with 4 additions and 15 deletions.
19 changes: 4 additions & 15 deletions src/components/ContactForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,22 +141,11 @@ export default class ContactForm extends Component {

this.increaseAttempts()

// const payload = {
// email: email,
// lang: this.props.lang,
// message: message
// // replace multiple line breaks (2 and more) by <br><br>
// .replace(/(\r\n|\n\r|\r|\n){2,}/g, `<br><br>`)
// // replace single line breaks by <br>
// .replace(/(\r\n|\n\r|\r|\n)/g, `<br>`)
// .trim(),
// }

const sanitizedMessage = message
// replace multiple line breaks (2 and more) by <br><br>
.replace(/(\r\n|\n\r|\r|\n){2,}/g, `<br><br>`)
// replace single line breaks by <br>
.replace(/(\r\n|\n\r|\r|\n)/g, `<br>`)
// // replace multiple line breaks (2 and more) by <br><br>
// .replace(/(\r\n|\n\r|\r|\n){2,}/g, `<br><br>`)
// // replace single line breaks by <br>
// .replace(/(\r\n|\n\r|\r|\n)/g, `<br>`)
.trim()

const payload = [
Expand Down

0 comments on commit 63ca567

Please sign in to comment.