### Bug description

In a book project, if I add `sharing:` metadata with one service specified, the URL assigned to the sharing icon in the rendered page is malformed.  However, If I add two or more services, the URLs seem to be formatted properly.

To reproduce:

Create a new book project:

```
$ quarto create-project mybook --type book
$ quarto preview mybook
```

Add a `sharing:` entry to _quarto.yml so it looks like:

```
project:
  type: book

book:
  title: "mybook"
  author: "Norah Jones"
  date: "5/22/2023"
  sharing: twitter
  chapters:
    - index.qmd
    - intro.qmd
    - summary.qmd
    - references.qmd

bibliography: references.bib

format:
  html:
    theme: cosmo
  pdf:
    documentclass: scrreprt
```

After render, clicking on the "twitter" icon causes a redirect to URL:

`https://twitter.com/intent/tweet?url=|url|`

and of course Twitter doesn't know how to handle it.

Results are similar if I use "linkedin" or "facebook" instead of "twitter".

But if the `sharing:` tag looks as follows: `sharing: [twitter, linkedin]`, choosing either icon results in the expected redirect URL.

OS: Kubuntu 20.04

Quarto version: 1.3.282

### Checklist

- [ ] Please include a minimal, fully reproducible example in a single .qmd file? Please provide the whole file rather than the snippet you believe is causing the issue.
- [ ] Please [format your issue](https://quarto.org/bug-reports.html#formatting-make-githubs-markdown-work-for-us) so it is easier for us to read the bug report.
- [ ] Please document the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
- [ ] Please document the operating system you're running. If on Linux, please provide the specific distribution.
- [ ] Please provide the output of `quarto check` so we know which version of quarto and its dependencies you're running.
dragonstyle
2023-05-22T20:06:00Z
blacksqr
bug triaged-to
closed
Invalid URL assigned to social sharing icon
https://github.com/quarto-dev/quarto-cli/issues/5629