### Bug description

When rendering a book project to html `quarto render --to html`,  the search bar seems to yield no results.
![afbeelding](https://github.com/quarto-dev/quarto-cli/assets/44399190/f93b69a3-c07d-438a-83a8-37dac2e1994c)

When previewing the book project `quarto preview`, the search bar does show results.
![afbeelding](https://github.com/quarto-dev/quarto-cli/assets/44399190/0ad7f62f-3609-43bf-a38c-583fe46f79dc)



### Steps to reproduce

In `RStudio`: `New Project...` > `New Directory` > `Quarto Book` > testbook > `Create Project`
Then, render the document using `quarto render --to html`. Open the index.html file and  typing 's' for example leads to no results.

Preview the document using `quarto preview`. In the browser, typing 's' does show results.


### Expected behavior

Results should show in both cases.

### Actual behavior

No results whatsoever for a rendered .html file.

### Your environment

- IDE:  RStudio 2023.06.0+421
- OS: Windows 10 64 bit

### Quarto check output

```bash
$ quarto check

[>] Checking versions of quarto binary dependencies...
      Pandoc version 3.1.2: OK
      Dart Sass version 1.55.0: OK
      Deno version 1.33.2: OK
[>] Checking versions of quarto dependencies......OK
[>] Checking Quarto installation......OK
      Version: 1.4.146
      Path: C:\Users\Li Yong\AppData\Local\Programs\Quarto\bin
      CodePage: 1252

[>] Checking basic markdown render....OK

[>] Checking Python 3 installation....OK
      Version: 3.11.4
      Path: C:/Users/Li Yong/AppData/Local/Programs/Python/Python311/python.exe
      Jupyter: (None)

      Jupyter is not available in this Python installation.
      Install with py -m pip install jupyter

[>] Checking R installation...........OK
      Version: 4.1.0
      Path: C:/PROGRA~1/R/R-41~1.0
      LibPaths:
        - E:/Documenten/R/win-library/4.1
        - C:/Program Files/R/R-4.1.0/library
      knitr: 1.39
      rmarkdown: 2.14

[>] Checking Knitr engine render......OK
```
2023-06-14T21:47:19Z
liyongg
open
Searching book in rendered html yields no results, preview html does yield results.
https://github.com/quarto-dev/quarto-cli/issues/5931