Automattic / Automattic/VIP-Coding-Standards

Support when esc_xml() should be used

Aperta
#555 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Standard: VIP-Go Type: Enhancement
Lingua principale
PHP
Stelle
261
Fork
44
Merge medio
19m
PR unite (30g)
1

Descrizione

## What problem would the enhancement address for VIP?

`esc_xml()` is being [introduced in WP 5.5](https://make.wordpress.org/core/2020/07/21/new-esc_xml-function-in-wordpress-5-5/).

It would be great if WordPressVIPMinimum.Security.ProperEscapingFunction sniff could recognise when an escaping function is being used (typically `esc_html()` up to now, but someone may have used an incorrect escaping function) in an XML context.

## Describe the solution you'd like

Update the existing sniff.

Update our public docs to better clarify when `esc_xml()` should be used.

## What code should be reported as a violation?

{Needs examples}

## What code should *not* be reported as a violation?

{Needs examples}

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia leggendo lo sniff esistente WordPressVIPMinimum.Security.ProperEscapingFunction e la documentazione pubblica a cui fa riferimento. Usa l’introduzione di esc_xml() e il comportamento richiesto nel contesto XML per definire esempi rappresentativi segnalati e non segnalati; il lavoro è completato quando lo sniff riconosce la funzione di escaping corretta e la documentazione spiega quando dovrebbe essere usato esc_xml().

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
php
Ambito
documentation, tooling
Tipo di issue
Funzionalità
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.