Skip to content

Commit da81d9f

Browse files
committed
notificationeventwebhook : adding html_entity_decode function for url
1 parent 738f142 commit da81d9f

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Webhook
1+
# Webhook - will be discontinued after GLPI V10, as its main functionalities will be included in GLPI V11's core
22
Webhook Plugin for GLPI
33

44
This plugin let you register webhooks where notifications will be sent.<br/>

inc/notificationeventwebhook.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ static public function extraRaise($params) {
161161
$url = $webhook_infos['additionnaloption']['address'];
162162
$url = NotificationTemplate::process($webhook_infos['additionnaloption']['address'], $data); // substitute variables in url
163163
// $url = str_replace(["\n", "\r", "\t"], ['', '', ''], htmlentities($url)); // translate HTML-significant characters and suppress remaining escape characters
164-
$url = str_replace(["\n", "\r", "\t"], ['', '', ''], $url); // suppress remaining escape characters
164+
$url = str_replace(["\n", "\r", "\t"], ['', '', ''], html_entity_decode($url)); // suppress remaining escape characters
165165
if ($template_datas = $template->getByLanguage($webhook_infos['language']))
166166
{
167167
$template_datas = Sanitizer::unsanitize($template_datas); // unescape html from DB

setup.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ function plugin_version_webhook() {
111111

112112
return [
113113
'name' => _n('Webhook', 'Webhooks', 2, 'webhook'),
114-
'version' => '1.0.19',
114+
'version' => '1.0.20',
115115
'author' => "Eric Feron",
116116
'license' => 'GPLv2+',
117117
'homepage'=> 'https://github.com/ericferon/glpi-webhook',

webhook.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@
2222
<author>Eric Feron</author>
2323
</authors>
2424
<versions>
25+
<version>
26+
<num>1.0.20</num>
27+
<compatibility>>=10.0.3</compatibility>
28+
<download_url>https://github.com/ericferon/glpi-webhook/releases/download/v1.0.20/webhook-v1.0.20.tar.gz</download_url>
29+
</version>
2530
<version>
2631
<num>1.0.19</num>
2732
<compatibility>>=10.0.3</compatibility>

0 commit comments

Comments
 (0)