SPIP
Article proposé
L’article « |attribut_url
(SPIP) » est proposé
à la publication depuis le mardi 16 juillet 2024.
|attribut_url
mardi 16 juillet 2024 , par jack
Sommaire
- See also
The |attribut_url
filter must be applied to a tag when it is used as the
href
or src
attribute of an HTML tag in order to secure this usage.
This filter is therefore the equivalent of |attribut_html
(SPIP) adapted to
URLs, as it makes changes that would break URLs.
Examples :
-
Securing the url of a link contained in an environment variable :
[]
-
In the template
squelettes-dist/modeles/favicon.html
, the
|attribut_url
filter secures the#ENV*{favicon}
tag which comes from
the environment and whose content may be dangerous.[]
Language strings
The attribut_url
filter must also be used on language strings returning a
url.
See also|Retour au sommaire
- |attribut_html
(SPIP)
— Envoyé par SPIP (https://www.spip.net/)