Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error - Attempted to call function "specialchars" from the global namespace. #58

Open
berecont opened this issue Feb 28, 2024 · 0 comments

Comments

@berecont
Copy link

Contao 5.3.0
php81
version dev-contao5

in my customized template I get this error:
Attempted to call function "specialchars" from the global namespace.
with a reference to line 31

<input type="<?= $this->type ?>" name="<?= $this->name ?>" id="ctrl_<?= $this->id ?>" class="text<?php if ($this->class): ?> <?= $this->class ?><?php endif; ?>" value="<?= specialchars($this->value) ?>"<?= $this->getAttributes() ?> data-input autocomplete="off">

changing <?= specialchars($this->value) ?> to <?= htmlspecialchars($this->value, ENT_QUOTES, 'UTF-8') ?> prevents the error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant