Skip to content

Commit

Permalink
Merge pull request #57 from 64j/3.1.x
Browse files Browse the repository at this point in the history
Remove getPhpCompat
  • Loading branch information
64j authored Aug 2, 2024
2 parents 665d245 + 61087df commit 4987767
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions assets/plugins/templatesedit/class/templatesedit.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ public function renderAfterTemplate(): string
$out .= $this->form('input', [
'type' => 'hidden',
'name' => $fieldName,
'value' => isset($this->doc[$fieldName]) ? $this->evo->getPhpCompat()->htmlspecialchars($this->doc[$fieldName]) : ''
'value' => isset($this->doc[$fieldName]) ? htmlspecialchars($this->doc[$fieldName], ENT_COMPAT) : ''
]);
}
$out .= '<!-- end hidden fields -->';
Expand Down Expand Up @@ -712,7 +712,7 @@ protected function renderField(string $key, array $data, array $settings = []):
case 'introtext':
$field .= $this->form('textarea', [
'name' => 'introtext',
'value' => $this->evo->getPhpCompat()->htmlspecialchars(stripslashes($this->doc['introtext'])),
'value' => htmlspecialchars(stripslashes($this->doc['introtext']), ENT_COMPAT),
'class' => $data['class'],
'rows' => empty($data['rows']) ? 3 : $data['rows']
]);
Expand All @@ -722,7 +722,7 @@ protected function renderField(string $key, array $data, array $settings = []):
if ($this->doc['type'] != 'reference') {
$field .= $this->form('textarea', [
'name' => 'ta',
'value' => $this->evo->getPhpCompat()->htmlspecialchars(stripslashes($this->doc['content'])),
'value' => htmlspecialchars(stripslashes($this->doc['content']), ENT_COMPAT),
'class' => $data['class'],
'rows' => empty($data['rows']) ? 20 : $data['rows']
]);
Expand Down Expand Up @@ -884,7 +884,7 @@ protected function renderField(string $key, array $data, array $settings = []):
default:
$field .= $this->form('input', [
'name' => $key,
'value' => $this->evo->getPhpCompat()->htmlspecialchars(stripslashes($this->doc[$key])),
'value' => htmlspecialchars(stripslashes($this->doc[$key]), ENT_COMPAT),
'class' => 'form-control ' . $data['class'],
'attr' => 'spellcheck="true"' . $data['required'] . $data['pattern']
]);
Expand Down Expand Up @@ -1179,10 +1179,10 @@ protected function view(string $tpl, array $data = []): string
* @param string $separator
* @return string
*/
protected function showChoices(int $id, string $value = '', string $separator = ', '): string
protected function showChoices(int $id, string $value = '', $separator = ', '): string
{
$out = '';
$separator = is_bool($separator) ? ', ' : $this->evo->getPhpCompat()->htmlspecialchars($separator);
$separator = is_bool($separator) ? ', ' : htmlspecialchars($separator, ENT_COMPAT);

$rs = $this->evo->getDatabase()
->query('
Expand Down

0 comments on commit 4987767

Please sign in to comment.