jekyll-theme-consulting 0.10.4 → 0.10.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '0267749ef77dd82f236dd948e2aa7414eeda519ca5c13f54546e06d9933681be'
4
- data.tar.gz: b84c63d4fef729187874985609a8866131caa3d927fdfdb97677c68f2f5c965c
3
+ metadata.gz: 880c5f6968a4caf14e66645c579dc1a200d1404e5a12d97dc3bba9ad45caaeca
4
+ data.tar.gz: df75715e012c0c0dca44b7ce65a87490172f9d49fe41a8d8eacb12535cd9776b
5
5
  SHA512:
6
- metadata.gz: 376739a8d52226d30c647ffe07b3343fb813047493a37c7150ac8c20e5212bcc99282820dc97b01ce701545af31c59e587bb9feca106e76f167219af08f3fd56
7
- data.tar.gz: 1afd669eb76697a58b947c15a69b2e433600cd1fa088337850fd6cbddac90f841f5bdcfe54bd71c7e4e9673142cd469f2d84ce14aec4e9041fb04883979055de
6
+ metadata.gz: 15e984e908dade6243a9f4c48f801789a46bac5e3544dcf357f3582c6553887f748f9f7f5c1c808bb758df571485cdc7c193506a411ef254a458742a8072bf69
7
+ data.tar.gz: 157a6a51ff32c1d07e676933f437ca699db975ebd35c9c91e5ef506462e544ba852d51d5a62bc420479110d66ebac2709260010726adc09c76dc343df88dd37e
@@ -54,25 +54,17 @@
54
54
  };
55
55
 
56
56
  const sendContactMessage = function() {
57
- const data = {
58
- name: encodeURIComponent(nameInputElement.value),
59
- email: encodeURIComponent(emailInputElement.value),
60
- message: encodeURIComponent(messageInputElement),
61
- token: grecaptcha.getResponse(recaptchaWidget)
62
- };
57
+ const formData = new FormData();
58
+ formData.append('name', encodeURI(nameInputElement.value));
59
+ formData.append('email', encodeURI(emailInputElement.value));
60
+ formData.append('message', encodeURI(messageInputElement.value));
61
+ formData.append('token', grecaptcha.getResponse(recaptchaWidget));
63
62
 
64
63
  fetch("{{ '/contact.php' | absolute_url }}", {
65
64
  method: 'POST',
66
- mode: 'same-origin',
67
- headers: {'Content-Type': 'application/json',},
68
- body: JSON.stringify(data),
69
- })
70
- .then((response) => {
71
- alert('Message sent!');
72
- })
73
- .catch((error) => {
74
- console.error('Error:', error);
75
- });
65
+ body: formData})
66
+ .then((response) => alert('Message sent!'))
67
+ .catch((error) => console.error('Error:', error));
76
68
  };
77
69
 
78
70
  var onRecaptchaLoadCallback = function() {
@@ -80,8 +72,7 @@
80
72
  'sitekey' : '{{ site.recaptcha.sitekey }}',
81
73
  'theme' : 'dark',
82
74
  'size' : 'compact',
83
- 'callback' : processContactRequest
84
- });
75
+ 'callback' : processContactRequest});
85
76
  };
86
77
 
87
78
  modalWindowElement.addEventListener('click', hideModalWindow);
@@ -4,22 +4,22 @@ mail:
4
4
  subject:
5
5
  intro:
6
6
  ---
7
- {%- capture mail-intro -%}You received a message on <a href="{{ site.url }}">your website</a>.{%- endcapture -%}
7
+ {%- capture mail-intro -%}You received a message on <a href='{{ site.url }}'>your website</a>.{%- endcapture -%}
8
8
  <?php
9
9
 
10
10
  $contact_name = $contact_email = $contact_message = $token = $contact_ip = "";
11
11
 
12
12
  if ($_SERVER["REQUEST_METHOD"] == "POST") {
13
13
  if (has_required_data($_POST)) {
14
- $contact_name = filter_var(
14
+ $contact_name = urldecode(filter_var(
15
15
  $_POST["name"],
16
- FILTER_SANITIZE_FULL_SPECIAL_CHARS);
17
- $contact_email = filter_var(
16
+ FILTER_SANITIZE_FULL_SPECIAL_CHARS));
17
+ $contact_email = urldecode(filter_var(
18
18
  $_POST["email"],
19
- FILTER_SANITIZE_EMAIL);
20
- $contact_message = filter_var(
19
+ FILTER_SANITIZE_EMAIL));
20
+ $contact_message = urldecode(filter_var(
21
21
  $_POST["message"],
22
- FILTER_SANITIZE_FULL_SPECIAL_CHARS);
22
+ FILTER_SANITIZE_FULL_SPECIAL_CHARS));
23
23
  $token = filter_var(
24
24
  $_POST["token"],
25
25
  FILTER_SANITIZE_URL);
@@ -73,11 +73,11 @@ function send_mail ($name, $email, $message, $ip) {
73
73
  "{{ site.email }}",
74
74
  "{{ page.mail.subject | default: 'Contact request' }}",
75
75
  (
76
- "{{ page.mail.intro | default: mail-intro }}<br>\r\n"
77
- ."Ip: ".$ip."<br>\r\n"
78
- ."Name: ".$name."<br>\r\n"
79
- ."Email: ".$email."<br>\r\n"
80
- ."Message: ".$message."<br>\r\n"),
76
+ "{{ page.mail.intro | default: mail-intro }}<br>\r\n"
77
+ ."Ip: ".$ip."<br><br>\r\n"
78
+ ."Name: ".$name."<br><br>\r\n"
79
+ ."Email: ".$email."<br><br>\r\n"
80
+ ."Message: ".$message."<br><br>\r\n"),
81
81
  (
82
82
  "From: ".$name
83
83
  ." <".$email.">\r\n"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-theme-consulting
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.4
4
+ version: 0.10.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Moodule
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-08-12 00:00:00.000000000 Z
11
+ date: 2020-08-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll