Skip to content

Commit 14cceff

Browse files
committed
fix: several field have useless slash escaping
Signed-off-by: Thierry Bugier <[email protected]>
1 parent f6a33ad commit 14cceff

10 files changed

+11
-11
lines changed

inc/field/actorfield.class.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -217,11 +217,11 @@ public function getValueForTargetText($richText): string {
217217
$value = [];
218218
foreach ($this->value as $item) {
219219
if (filter_var($item, FILTER_VALIDATE_EMAIL) !== false) {
220-
$value[] = Toolbox::addslashes_deep($item);
220+
$value[] = $item;
221221
} else {
222222
$user = new User();
223223
$user->getFromDB($item);
224-
$value[] = Toolbox::addslashes_deep($user->getFriendlyName());
224+
$value[] = $user->getFriendlyName();
225225
}
226226
}
227227

inc/field/datefield.class.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ public function getValueForDesign(): string {
117117
}
118118

119119
public function getValueForTargetText($richText): string {
120-
return Toolbox::addslashes_deep(Html::convDate($this->value));
120+
return Html::convDate($this->value);
121121
}
122122

123123
public function hasInput($input): bool {

inc/field/datetimefield.class.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ public function hasInput($input): bool {
123123
}
124124

125125
public function getValueForTargetText($richText): string {
126-
return Toolbox::addslashes_deep(Html::convDateTime($this->value));
126+
return Html::convDateTime($this->value);
127127
}
128128

129129
public function moveUploads() {

inc/field/floatfield.class.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ public function getValueForDesign(): string {
126126
}
127127

128128
public function getValueForTargetText($richText): string {
129-
return Toolbox::addslashes_deep($this->value);
129+
return $this->value;
130130
}
131131

132132
public function moveUploads() {

inc/field/hiddenfield.class.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public static function getName(): string {
111111
}
112112

113113
public function getValueForTargetText($richText): string {
114-
return str_replace("\n", '\r\n', Toolbox::addslashes_deep($this->value));
114+
return str_replace("\n", '\r\n', $this->value);
115115
}
116116

117117
public function hasInput($input): bool {

inc/field/hostnamefield.class.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public function getValueForDesign(): string {
8888
}
8989

9090
public function getValueForTargetText($richText): string {
91-
return Toolbox::addslashes_deep($this->value);
91+
return $this->value;
9292
}
9393

9494
public function hasInput($input): bool {

inc/field/ipfield.class.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public function getValueForDesign(): string {
9696
}
9797

9898
public function getValueForTargetText($richText): string {
99-
return Toolbox::addslashes_deep($this->value);
99+
return $this->value;
100100
}
101101

102102
public function moveUploads() {

inc/field/tagfield.class.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ public function getValueForDesign(): string {
147147

148148
public function getValueForTargetText($richText): string {
149149
$value = Dropdown::getDropdownName(PluginTagTag::getTable(), $this->value);
150-
return Toolbox::addslashes_deep($value);
150+
return $value;
151151
}
152152

153153
public function isValid(): bool {

inc/field/textfield.class.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ public function getValueForDesign(): string {
131131
}
132132

133133
public function getValueForTargetText($richText): string {
134-
return Toolbox::addslashes_deep($this->value);
134+
return $this->value;
135135
}
136136

137137
public function moveUploads() {

inc/field/timefield.class.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ public function getValueForTargetText($richText): string {
122122
if ($date === false) {
123123
return ' ';
124124
}
125-
return Toolbox::addslashes_deep($date->format('H:i'));
125+
return $date->format('H:i');
126126
}
127127

128128
public function moveUploads() {

0 commit comments

Comments
 (0)