Set-PnPListItem with an apostrophe / single quote in the name when using the -Batch parameter fails
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 68/100
Direzione di ricerca
Start from the Set-PnPListItem entry point and trace the -Batch path that builds the list-title request. Reproduce the issue with a list named "name with 'apostrophe" and compare batched and non-batched calls; done means the batched call succeeds without requiring callers to pre-escape the apostrophe.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Reporting an Issue
When calling Set-PnPListItem -List $name -Batch $BATCH when $name has a single quote / apostrophe in the command fails.
The call works if the -Batch parameter is not provided or the single quote is escaped before calling, eg. using $name.replace("'", "''")
Expected behavior
The apostrophe should be escaped and the call should succeed and be batched.
Actual behavior
The apostrophe isn't escaped and the name passed to the underlying framework is invalid.
Steps to reproduce behavior
Establish a connection to a site with a list that has an apostrophe in the name and start a batch with
$BATCH = New-PnPBatch
Try and set the values of an item on that list
$Values = @{}
Set-PnPListItem -List "name with 'apostrophe" -Identity <item id> -Values $values -Batch $BATCH
This should produce the error
The expression "web/lists/getbytitle('name with 'aprostophe')" is not valid.
What is the version of the Cmdlet module you are running?
Issue exists in both versions.
Manifest 3.4.40 nightly
Manifest 3.4.30 nightly
Which operating system/environment are you running PnP PowerShell on?
- Windows
- Linux
- MacOS
- Azure Cloud Shell
- Azure Functions
- Other : please specify
- Lingua principale
- C#
- Stelle
- 905
- Fork
- 409
- Merge medio
- 2g 9h
- PR unite (30g)
- 10
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di pnp/powershell
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
pnp/powershell#5476 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 52/100
pnp/powershell#5480 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
pnp/powershell#5477 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
pnp/powershell#5466 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
pnp/powershell#5399 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di pnp/powershell
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
ClickHouse/clickhouse-cs#639 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
ifpebj-ti/controle-acesso-veiculos#377 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Money ExploitsApertaS: Untriaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
project-wayfarer/wayfarer-14#1628 ·
I maintainer di solito rispondono entro 3 giorni
-
:watch: Not Triaged dotnet-target-version
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno